You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Pete Robbins <ro...@googlemail.com> on 2006/05/06 19:02:49 UTC

[Axis2] How do I add multiple elements to soap body?

If I have a doc/lit ws how do I code a client to produce the message:

<soap:envelope>
    <soap:body>
        <x>fred</x>
        <y>joe</y>
    </soap:body>
</soap:envelope>

The client APIs seem to take a single axis2_om_node_t* payload which I
assume is inserted into the soap body. Is there an API to add more than one
element as above?

Cheers,

--
Pete

Re: [Axis2] How do I add multiple elements to soap body?

Posted by Pete Robbins <ro...@googlemail.com>.
ok, that's fine. Makes life a lot simpler having just the one message part
;-)

On 07/05/06, Nabeel <na...@wso2.com> wrote:
>
> Hi Pete,
>    With svc_client API you can send only one body part (making it WS-I
> compliant). with op_client you can create the SOAP message to have more
> than one child, but the engine (raw msg receiver to be precise)
> processes only the first child of the body element.
>    You might need to use doc/lit wrapped (and change WSDL) to have this
> sent to the service provider.
>
> -Nabeel
>
> Pete Robbins wrote:
>
> > |
> >
> >|If I have a doc/lit ws how do I code a client to produce the message:|
> >
> >|<soap:envelope>
> >    <soap:body>
> >        <x>fred</x>
> >        <y>joe</y>
> >    </soap:body>
> ></soap:envelope>|
> >
> > |
> > |The client APIs seem to take a single axis2_om_node_t* payload which
> > I assume is inserted into the soap body. Is there an API to add more
> > than one element as above? |
> > ||
> > |Cheers,|
> > ||
> > --
> > Pete
>
>
>


--
Pete

Re: [Axis2] How do I add multiple elements to soap body?

Posted by Nabeel <na...@wso2.com>.
Hi Pete,
    With svc_client API you can send only one body part (making it WS-I 
compliant). with op_client you can create the SOAP message to have more 
than one child, but the engine (raw msg receiver to be precise) 
processes only the first child of the body element.
    You might need to use doc/lit wrapped (and change WSDL) to have this 
sent to the service provider.

-Nabeel

Pete Robbins wrote:

> |
>
>|If I have a doc/lit ws how do I code a client to produce the message:|
>
>|<soap:envelope>
>    <soap:body>
>        <x>fred</x>
>        <y>joe</y>
>    </soap:body>
></soap:envelope>|
>
> |
> |The client APIs seem to take a single axis2_om_node_t* payload which 
> I assume is inserted into the soap body. Is there an API to add more 
> than one element as above? |
> || 
> |Cheers,|
> ||
> -- 
> Pete