Anne Thomas Manes wrote:
Anne, thanks again for your detailed response! I appreciate it because I couldn't find anywhere with good documentation on responses.<soap:Body> cannot contain text content, so the response must be returned as a child element of the <soap:Body>. Also, when using wrapped or document, the message part must reference an element, not a type. It seems to me that, since you must add a wrapper element when returning a scalar value, it's more consistent to always add the wrapper element. Also, as you said, this is also the .NET convention. Ie, int getUserAge(String name)returns <soapenv:Body>
<tns:getUserAgeResponse>
5
</tns:getUserAgeResponse>
</soapenv:Body>
Therefore (for consistency)User getUser(String name)returns <soapenv:Body>
<tns:getUserResponse>
<user>
...
</user>
</tns:getUserResponse>
</soapenv:Body>
I understand that this isn't a requirement, just a convention.Bill So what I'm saying is that wrapped/literal is doc/literal. Elements that you define as your request and response message parts are what will be sent as the child element of the <soap:Body>. e.g.:<wsdl:message name="getUserRequest"> <wsdl:part name="parameters" element="tns:getUser"/> </wsdl:message> results in: <soapenv:Body> <tns:getUser xmlns:tns="..." /> </soapenv:Body> and <wsdl:message name="getUserResponse"> <wsdl:part name="parameters" element="tns:user"/> </wsdl:message> results in <soapenv:Body> <tns:user xmlns:tns="..." /> </soapenv:Body> Whether using wrapped or document style, the <soap:Body> must contain at most one direct child element. (i.e., at most one body part). When using wrapped, the convention is that the request message body part element has the same name as the operation name. There's no specific convention for the return message, but it should map to the return value for the operation. When using document, the request message body part doesn't have the same name as the operation, but it still must contain at most one part. -Anne On Thu, 13 Jan 2005 12:43:03 +0900, Bill Keese <[EMAIL PROTECTED]> wrote: |
- wrapped/literal: complex return value Bill Keese
- Re: wrapped/literal: complex return value Anne Thomas Manes
- Re: wrapped/literal: complex return value Bill Keese
- Re: wrapped/literal: complex return value Anne Thomas Manes
- Bill Keese
