FusionCharts Forum: FusionCharts over https in IE - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

FusionCharts over https in IE https

#1 User is offline   jodde 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 12-March 08

Posted 12 March 2008 - 09:52 AM

I have read the article about FusionCharts over SSL, http://www.fusioncha...e.aspx?id=10091



but I still can't get it right.



I've changed my headers to:

Cache-Control: cache, must-revalidate

Pragma: public



like this:



response.setContentType("text/xml");

response.setHeader("Cache-Control", "cache, must-revalidate");

response.setHeader("Pragma", "public");



in my jsp page that prints out the xml data. I get access to the page in Internet Explorer but I cannot get the javascript code (with the dataUrl method) to read and download the xml.



I get a "movie not loaded" error instead. It works well in other browsers like Firefox.
0

Other Replies To This Topic

#2 User is offline   jodde 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 12-March 08

Posted 14 March 2008 - 03:38 AM

Can the problem be that I can't load the swf file in IE on https?



Because It looks like the browser never reads form the XML page. When I try a system.println before and after the headers I get nothing. Like if the flash component never even starts reading the xml file. This works well in firefox and I get the both printlines.



Anyone that knows what the problem is?
0

Other Replies To This Topic

#3 User is offline   new2fc 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 29-July 08

Posted 29 July 2008 - 09:09 PM

I encoutered exact the same problem. My observation is that if the page requires login, no matter it is http or https, we're going to see this issue on IE, both IE6 and IE7 (Didn't test on other IE versions, but I guess it is the same).

Did anyone here actually see FusionCharts work on IE if the page (that contains the "setDataURL" statement) requires login autentication? If yes, please help out.

Thanks.

New_FusionCharts_User
0

Other Replies To This Topic

#4 User is offline   Rahul Kumar 

  • Supreme Being
  • Group: Moderators
  • Posts: 1040
  • Joined: 18-March 08

Posted 29 July 2008 - 11:42 PM

Hi,

Please use NetworkCredential class from System.Net namespace, and use the following method to pass the username & password (Credential) to the domain.

Example Code:

// Creates object with username, password & Domain.
NetworkCredential
myCreds = new NetworkCredential
({username}, {password}, urlDomain);
// Sets the location URL, that is to be fetched.
HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create({URL to fetch});
// Sets Credentials
myHttpWebRequest.Credentials = myCreds;
// Now final stage to call the URL
// Send the 'HttpWebRequest' and wait for response.
HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse();

This might solve your need.


Regards,
Rahul Kumar
Software Engineer

A byte of magic.

 
0

Other Replies To This Topic

#5 User is offline   new2fc 

  • Forum Newbie
  • Group: Members
  • Posts: 5
  • Joined: 29-July 08

Posted 30 July 2008 - 01:08 PM

Hi Rahul,

Thank you very much for the example code. I have the following code in f1.jsp:

  <div id='chartdiv' align="center">
The chart will appear within this DIV. This text will be replaced by the chart.
  </div>

  <script type="text/javascript">
var chart = new FusionCharts("../../FusionWidgets/ScrollArea2D.swf", "ChartId", "580", "300", "0", "0");
chart.setDataURL("ScrollAreaData.jsp");
chart.render("chartdiv");
  </script>

Could you tell me how do I put those 2 pieces of code together? I am thinking what should I replace the "URL to fetch" with, should I replace it with "ScrollArea2D.swf", or "ScrollAreaData.jsp", or "f1.jsp"?

New_FusionCharts_User
0

Other Replies To This Topic

#6 User is offline   Rahul Kumar 

  • Supreme Being
  • Group: Moderators
  • Posts: 1040
  • Joined: 18-March 08

Posted 31 July 2008 - 12:08 AM

Hi,

You need to use the code in f1.jsp, you also need the following code along with the above.

System.IO.Stream rs = myHttpWebResponse.GetResponseStream();
XmlDocument xmlDOC = new XmlDocument
();
xmlDOC.Load(rs);
string xml=xmlDOC.OuterXml.Replace('"', '''));

Now the XML string contains strings with Line Feed & Carriage Return, so you have to remove those from the XML & after getting the XML use setDataXML method to render the chart.
You have to replace "URL to fetch" with the URL that is generating the XML, for the above case it should be replaced with http://domain_name/ScrollAreaData.jsp, and urlDomain should be replaced by the domain name.
Please also note that the above example code is written in C#.

Regards,
Rahul Kumar
Software Engineer

A byte of magic.

 
0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic