1 Reply Latest reply on Oct 6, 2010 5:37 AM by ShanthiFlash

    [RPC Fault faultString="Error #1096: XML parser failure: Unterminated element."




      I have created an Flex application, which retrives the data in xml format from PHP.


      It is working fine in Web Application, but while converted this into AIR Desktop Application it gives error,"[RPC Fault faultString="Error #1096: XML parser failure: Unterminated element." faultCode="Client.CouldNotDecode" faultDetail="null"]"



      my flex code is :


      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationComplete="userRequest.send()">



         <mx:HTTPService id="userRequest" url="http://hostname/request.php" useProxy="false" method="POST">

         <mx:DataGrid  id="dgUserRequest" x="222" y="128" dataProvider="{userRequest.lastResult.users.user}">
         <mx:DataGridColumn headerText="User ID"    dataField="userid"/>
         <mx:DataGridColumn headerText="First Name" dataField="firstname"/>
         <mx:DataGridColumn headerText="Last Name" dataField="lastname"/>
         <mx:DataGridColumn headerText="Email" dataField="emailaddress" width="250"/>





      if we Change the opening and closing Application tag to WindowedApplication, and try to run it gives those errors.


      my php code is :



      <?php require_once("java/Java.inc");
      $session = java_session();
      $uid = $_SERVER["HTTP_UID"];
      $givenName = $_SERVER["HTTP_GIVENNAME"];
      $sn = $_SERVER["HTTP_SN"];
      $mail = $_SERVER["HTTP_MAIL"];


      $Return = "<?xml version='1.0' encoding='iso-8859-1'?><users><user><userid>$uid</userid><firstname>$givenName</firstname ><lastname>$sn</lastname><emailaddress>$mail</emailaddress></user></users>";


      print ($Return);



      Please provide some help.