|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/10/2008 8:22:31 AM
Posts: 5,
Visits: 15
|
|
I have read the article about FusionCharts over SSL, http://www.fusioncharts.com/KB/article.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.
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/10/2008 8:22:31 AM
Posts: 5,
Visits: 15
|
|
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?
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/30/2008 6:25:07 PM
Posts: 5,
Visits: 10
|
|
| 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
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Yesterday @ 2:58:05 AM
Posts: 138,
Visits: 534
|
|
| 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 FusionCharts Team.
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/30/2008 6:25:07 PM
Posts: 5,
Visits: 10
|
|
| 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
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: Yesterday @ 2:58:05 AM
Posts: 138,
Visits: 534
|
|
| 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 FusionCharts Team.
|
|
|
|