0 Replies Latest reply on Sep 6, 2007 7:45 AM by oconq

    WebService and XML

    oconq
      How can we send any XML stream to a WebService ?

      I want to build a XML stream dynamically like this: <User id="1" firstName="Bob"/> and to send it to a web service method. I've tried many practives but nothing is working:

      <mx:operation name="AddAccount">
      <mx:request xmlns="">
      <User firstName="Bob"/>
      </mx:request>
      </mx:operation>
      In this case, the attribute is removed from the stream (!!!)

      WCF.AddAccount.addEventListener(ResultEvent.RESULT, GetData_OnResult);
      WCF.AddAccount.addEventListener(FaultEvent.FAULT, GetData_OnFault);
      var accountXML:XMLDocument = new XMLDocument();
      accountXML.parseXML("<User>" + "32" + "</User>");
      WCF.AddAccount.arguments["Account"] = accountXML;
      WCF.AddAccount.send();
      In this base, the service receive a strange stream like this:
      <attributes>[object Object]</attribute>


      Is there something working fine ???