[AWS] Merging XML as a SOAP payload/response

Marc Criley mc at mckae.com
Mon Aug 6 16:32:32 CEST 2007


>> I'd like to be able to build an XML document fragment and provide that to the
>> SOAP build routines to embed as a payload or response message.
>
>Not clear what you want to do. SOAP has a well defined semantic and you
>can't embed something in a payload or the other side will not be able to
>understand that. So can you clarify what you want to do ? Are you trying
>to send a SOAP message with attachment ?


What I'd like to be able to do is build the payload of a SOAP message as a
SOAP-compliant XML fragment, then hand it to AWS to embed within the SOAP
message.  (Maybe this violates the SOAP protocol--while I'm quite familiar with
XML, this is my first SOAP project.)

Say I wanted to pass along something like this:

 <SOAP-ENV:Body>
   <trackID xsi:type="xsd:int">2</trackID>
   <trackInfo>
      <position latitude="35.0" longitude="-93.0"/>
      <velocity speed="400.0" heading="47.0"/>
   </trackInfo>
 </SOAP-ENV:Body>

I could call a function that builds and returns an XML fragment that contains the
<trackInfo> element.  Then I would like to pass that fragment, represented as a
string, to AWS to have it make it a part of the SOAP message that is transmitted.

Right now if I do what I just proposed, the trackInfo gets encoded as a string
and gets passed as the content of an element, rather than _being_ an element.

If this is not what SOAP does, than that's fine, I'll recode it appropriately.  I
see that I could create this info as a separate document and provide it as an
attachment, but I'd like to avoid building a separate document and doing the
attachment stuff, since there's only a handful of data items I'd like to pass in
this way.

Thanks for your help.

Marc



More information about the AWS mailing list