Send the xml as a string value of name=value pair using the default contentType..
Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Samuel R. Neff Sent: Friday, December 29, 2006 10:09 AM To: [email protected] Subject: [flexcoders] Cannot send simple XML content to server with HTTPService It appears that HTTPService will not send XML to a server if it's simple content. Here's an example. Both buttons should send an HTTP POST to the server with XML. However, the "Send Simple" button sends an HTTP GET with no content whereas the Send Complex" button works fine. This can be confirmed by checking the .NET trace log or a HTTP proxy/monitor. Is there any workaround other than ensuring all content is complex (which means ensuring the server side ignores extra junk in the message) ? Thanks, Sam <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " layout="absolute"> <mx:Script> <![CDATA[ private function sendSimple():void { service.request = <testing one="1" />; service.send(); } private function sendComplex():void { service.request = <testing><one /></testing>; service.send(); } ]]> </mx:Script> <mx:HTTPService id="service" url="http://localhost/test.aspx <http://localhost/test.aspx> " contentType="application/xml" resultFormat="e4x" method="POST" /> <mx:VBox> <mx:Button label="Send Simple" click="sendSimple();" /> <mx:Button label="Send Complex" click="sendComplex();" /> </mx:VBox> </mx:Application>

