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 Lance Semmens <la...@swebtec.com> on 2006/01/19 17:15:18 UTC

Custom name for return value

I have a web service that exposes a method named "Registration". Axis
has automatically generated "RegistrationReturn" as the name to give the
return value. My client is expecting the name to be
"RegistrationResult". Is there any way to specify the return value's
name rather than using the axis default?

Ie. I would like this SOAP response:
-----------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<RegistrationResponse xmlns="urn:Microsoft.Search">
<RegistrationReturn>...</RegistrationReturn>
</RegistrationResponse>
</soap:Body>
</soap:Envelope>
----------------------------------------
Changed to:
----------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<RegistrationResponse xmlns="urn:Microsoft.Search">
<RegistrationResult>...</RegistrationResult>
</RegistrationResponse>
</soap:Body>
</soap:Envelope>



Thanks in advance,
Lance.

Re: Custom name for return value

Posted by Anne Thomas Manes <at...@gmail.com>.
Is this a document/literal service? What does your WSDL specify?

Anne

On 1/19/06, Lance Semmens <la...@swebtec.com> wrote:
>
> I have a web service that exposes a method named "Registration". Axis has
> automatically generated "RegistrationReturn" as the name to give the return
> value. My client is expecting the name to be "RegistrationResult". Is there
> any way to specify the return value's name rather than using the axis
> default?
>
> Ie. I would like this SOAP response:
> -----------------------------------------
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
>
> <soap:Body>
> <RegistrationResponse xmlns="urn:Microsoft.Search">
> <RegistrationReturn>...</RegistrationReturn>
> </RegistrationResponse>
> </soap:Body>
> </soap:Envelope>
> ----------------------------------------
> Changed to:
> ----------------------------------------
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
> http://www.w3.org/2001/XMLSchema">
>
> <soap:Body>
> <RegistrationResponse xmlns="urn:Microsoft.Search">
> <RegistrationResult>...</RegistrationResult>
> </RegistrationResponse>
> </soap:Body>
> </soap:Envelope>
>
>
> Thanks in advance,
> Lance.
>