1 Reply Latest reply on Oct 2, 2006 12:20 PM by Peter Farland

    Sending XML Attributes to a Web Service

    rittwager
      Can I send attributes by loading an object, and sending it by the WebService object? I am sending XML values in Action Script to a SOAP web service via these classes:

      mx.rpc.soap.WebService and mx.rpc.soap.AbstractOperation

      Everything is working fine, however the attributes are not getting passed over. My question is: How do I send XML attribute values via a WebService object?

      Example:

      <person>
      <Name>Bob</name>
      </person>

      I can send that like this:

      var person:Object = new Object();
      person.name = "Bob";

      However, what if I wanted to send this XML, with the attribute:

      <person city="Mayberry">
      <name>Bob</name>
      </person>
        • 1. Sending XML Attributes to a Web Service
          Peter Farland Level 3
          There is a limitation with this as mx.rpc.soap.Operation sees XML as a special case from the <mx:request> syntax that allows for binding to an xml model from the MXML interface for WebService... as such it expects the entire operation XML that would be pasted inside the SOAP BODY to be included here, not just the message part values.

          I'll log a bug for the next release to allow for this.