Reputation:
i created xml in flex after that creation i post to php via http service but when i add like xml in http service flex throws error msg like Error #1096: XML parser failure: Unterminated element." What did i worng ? How to send xml data flex to php ? plz refer me
<mx:HTTPService id="createxml" method="POST" url="http://####/admin/?do=storebettingdetails" useProxy="false"></mx:HTTPService>var xm:XML = new XML("**********"); ------ adding child node -- Thend attached xml to service like createxml.request=xm;
createxml.send();
Upvotes: 1
Views: 3779
Reputation: 5608
in script make your xml variable
[Bindable]
private var xml : XML = new XML("xml code");
and in mxml, on your httpservice component make:
<mx:HTTPService id="createxml"
method="post"
url="http://....../?do=storebettingdetails">
<mx:request>
<myxml>{this.xml}</myxml>
</mx:request>
</mx:HTTPService>
you will get the xml in php as $_POST['myxml']
Upvotes: 2