You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Martin Vossler <mv...@adelphia.net> on 2004/09/03 15:28:20 UTC

Named return element

How do I get apache soap to name the return element something other than 
return?  I would prefer it used the name of the return variable.


Re: Named return element

Posted by Scott Nichol <sn...@scottnichol.com>.
When using the RPC API (as opposed to the messaging API), the name of the return value is hard-coded.  
The following is from RPCConstants.java:

  public static String ELEM_RETURN = "return";

The following is from RPCProvider.java:

             pret= new Parameter(RPCConstants.ELEM_RETURN , ret.getClass(), ret, null);

If you want to specify the return value's name, you can

1. Use the messaging API

2. Subclass RPCProvider to create your own provider that would allow you to set the name in the Parameter.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Martin Vossler" <mv...@adelphia.net>
To: <so...@ws.apache.org>
Sent: Friday, September 03, 2004 9:28 AM
Subject: Named return element


> How do I get apache soap to name the return element something other than 
> return?  I would prefer it used the name of the return variable.
> 
>