A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: XML won't load over HTTPS!!!

  1. #1
    Senior Member
    Join Date
    Nov 2000
    Posts
    150

    XML won't load over HTTPS!!!

    I'm writing an application for my PDA that needs to get secure data from my server. I'm using xml.sendAndLoad to achieve this. On a PC browser this works perfectly. On my PDA I get "No Response" when using SSL, I get XML data returned if I don't use SSL.

    See the following test code. When I use SSL for the url I get "No Response" when I don't use SSL I get the XML response data.

    By the way, I just placed a dynamic text box on the stage to view "returnText".

    Flash Code
    Code:
    var myURL = "https://www.geckopc.com.au/testXML.php";
    
    var xmlReply:XML = new XML();
    xmlReply.onLoad = function(success:Boolean)
    {
    	if(success)
    	{
    		returnText = xmlReply.firstChild;
    
    	}else
    	{
    		returnText = "No response";
    	}
    }
    
    var reqXML:XML = new XML("<packet d=\"getData\"></packet>");
    reqXML.sendAndLoad(myURL, xmlReply);
    PHP Code
    Code:
    $rawXML = file_get_contents("php://input"); 
    
    $fh = fopen("phpXML.txt","a");
    fputs($fh, $rawXML."\n\n",8182);
    fclose($fh);
    
    $xml = new SimpleXMLElement($rawXML);
    
    if($xml['d'] = "getData")
    {
    	echo "<packet><mydata>test data</mydata></packet>";
    }else
    {
    	echo "<packet><mydata>No Data requested</mydata></packet>";
    }

    PDA: Dopod 838Pro, Windows Mobile 6 Pro, PIE with flash 7 player.
    SWF: Created in flash cs3, published as version 7 with AS 2.0.

    I have exausted my brain on this one, any ideas would be appreciated.

  2. #2
    Senior Member
    Join Date
    Jun 2004
    Location
    UK
    Posts
    451
    I'm no PHP coder, but the first thing I'd look at would be this:
    if($xml['d'] = "getData")
    I'd be wondering if this is an assignment and not a comparison, for which you would need a double equal "==" sign...

  3. #3
    Senior Member
    Join Date
    Nov 2000
    Posts
    150
    Thanks for your attention to detail goliard, you are correct.

    However, this was just some sample code I put up to illustrate the problem. Even with this error corrected, it works using "http" but doesn't work usinh "https". Even more confusing it that it works using "https" on a PC browser but not on a PDA (PIE).

    At this stage I'm leaning towards XML.sendAndReceive having a bug in Flash Player 7 for Pocket Internet Explorer.

  4. #4
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    I would suggest you also post in Adobe's windows mobile forum. There may be a number of people there who have specific experience with this problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center