You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Russell Butek <bu...@us.ibm.com> on 2002/01/07 19:34:05 UTC

Problem with parameter order on server side

It looks like we've got a parameter order problem on the server.  AXIS
assumes an order.  SOAP messages do not guarantee any order.  Assume we
have the following interface:

public interface iface {
    public void op(String p1, int p2);
}

When a SOAP message for this call is received by the server-side
RPCProvider.processMessage, it ignores the p1 and p2 names and assumes that
its args and argValues lists have an order.  This is bad.  If the client
were an AXIS client, then we have no problems, but if the client put the
parameters onto the SOAP message in the reverse order (which is perfectly
legal since there's no implied order in the SOAP message), then AXIS will
look for a method with the parameters reversed and barf.  In general, with
any method that has more than one parameter, AXIS assumes an order, and if
the SOAP message order is not the same, the chances are good that there
will be some runtime exception.

How can we fix this?  Two possibilities:
1.  deploy the service with method parameter names;
2.  let the skeleton figure it out; AXIS could give the skeleton a Map of
the parameters and the skeleton would pull them out by name and make the
call to the implementation in the proper order.

Comments?  Any other solutions?

Russell Butek
butek@us.ibm.com


Re: Problem with parameter order on server side

Posted by Simon Fell <so...@zaks.demon.co.uk>.
----- Original Message -----
From: "Russell Butek" <bu...@us.ibm.com>
To: <ax...@xml.apache.org>
Sent: Monday, January 07, 2002 10:34 AM
Subject: Problem with parameter order on server side


> It looks like we've got a parameter order problem on the server.  AXIS
> assumes an order.  SOAP messages do not guarantee any order.  Assume we
> have the following interface:

That depends on whether you're doing section 7 RPC or not, 7.1 bullet 3 is
"Each [in] or [in/out] parameter is viewed as an accessor, with a name
corresponding to the name of the parameter and type corresponding to the
type of the parameter. These appear in the same order as in the method
signature."

So for section 7 RPC, both name and order are important.
http://web3.w3.org/TR/SOAP/#_Toc478383533

Cheers
Simon
www.pocketsoap.com