You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Nicolas-Viet Nguyen <vi...@gmail.com> on 2006/06/06 06:25:22 UTC
Axis Handling Multi Part response
Hi Everyone,
Is it possible to have Axis capable of handling multi-part soap response
(Not MIME) as below? The style I am using is Document Literal. As you can
see I have two parts in the resonse at the same level, the second part which
is Session simply returns the id. When Axis parses this response, only the
first part is returned, the second part of the response is left out (There
is a line in Call#invoke: resEnv.getFirstBody(); which returns only the
first part). But then it will throw "element cannot be nested for simple
type" error when deserializing
Appreciate any inputs.
<SOAP-ENV:Header />
<SOAP-ENV:Body>
<getEmployeeResponse xmlns="urn:getEmployees">
<companyName xsi:type="xsd:string">DSS - Consumer Products</companyName>
<employeeName xsi:type="xsd:string">John <employeeName
<effdt xsi:type="xsd:dateTime ">2002-04-01T00:00:00Z</effdt>
<emplID xsi:type="xsd:string">222034 - Amir,Ali (Ali<emplID>
</getEmployeeResponse>
<Session type="xsd:string">6494B41800085139FF53EFC61B16D</Session >
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Re: Axis Handling Multi Part response
Posted by Anne Thomas Manes <at...@gmail.com>.
The SOAP Body may have at most one child element. You should send the
<Session> element either in a Header or as a child of the
<getEmployeeResponse> element.
Anne
On 6/6/06, Nicolas-Viet Nguyen <vi...@gmail.com> wrote:
>
> Hi Everyone,
> Is it possible to have Axis capable of handling multi-part soap response
> (Not MIME) as below? The style I am using is Document Literal. As you can
> see I have two parts in the resonse at the same level, the second part which
> is Session simply returns the id. When Axis parses this response, only the
> first part is returned, the second part of the response is left out (There
> is a line in Call#invoke: resEnv.getFirstBody(); which returns only the
> first part). But then it will throw "element cannot be nested for simple
> type" error when deserializing
>
> Appreciate any inputs.
>
>
> <SOAP-ENV:Header />
> <SOAP-ENV:Body>
> <getEmployeeResponse xmlns="urn:getEmployees">
> <companyName xsi:type="xsd:string">DSS - Consumer Products</companyName>
>
> <employeeName xsi:type="xsd:string">John <employeeName
> <effdt xsi:type="xsd:dateTime ">2002-04-01T00:00:00Z</effdt>
> <emplID xsi:type="xsd:string">222034 - Amir,Ali (Ali<emplID>
> </getEmployeeResponse>
>
> <Session type="xsd:string">6494B41800085139FF53EFC61B16D</Session >
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>