users@jax-rpc.java.net

Apache SOAP vs JWSDP interop issue ("return" element)

From: Alessio Cervellin <alessio.cervellin_at_sun-cs-italy.com>
Date: Fri, 15 Apr 2005 16:17:51 +0200 (CEST)

this is the issue:
On the server side there's a webservice developed *using Apache SOAP*, and it exposes a WSDL.
A client has been then generated starting from this WSDL *using JWSDP 1.4*.
This client sends correctly the request to the service, but the soap message received as response can't be parsed because the response element in the soap body (which is fine according to the schema in the wsdl) is enclosed within another tag named "return".

Example of the response:

<SOAP-ENV:Body>
        <ns0:methodName>
                <return>
                        <responseElement xsi:type="xsd:string"/>
                </return>
        </ns1:methodName>
</SOAP-ENV:Body>

The client complains it finds the element "return" instead of the element "responseElement".

Since the element "return" is not defined anywhere in the wsdl, why is it being added? By "googling", I noticed this behaviour is typical of Apache SOAP / Axis responses, whilst by generating the server-side with JWSDP - starting from the same wsdl - the element "return" is not added in the soap responses.

So, given a WSDL, a JWSDP-generated client can't talk to an ApacheSOAP-generated server... I wonder: is there any option to pass to wscompile so that the generated client can accept this "return" element?

PS: a client generated upon the same wsdl but with Axis works fine.