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 Samuel Penn <sa...@bifrost.demon.co.uk> on 2003/09/23 12:04:34 UTC

Order of arguments in .jws

I'm using Axis 1.1 final with Apache Tomcat and JDK 1.4. I'm trying to
create a
web service by creating a .jws file, and what I'm seeing is that the names of
arguments are being ignored, so when a web service is called, arguments are
passed in a 'random' order, regardless of type.

e.g., Calculator.jws:
public class Calculator {
    public int
    subtract(int a, int b) {
        return a - b;
    }
}

If I call this as:
http://localhost:8080/axis/Calculator.jws?method=subtract&a=5&b=2

I get a result back of -3.

More complicated methods, with say a mixture of ints and strings as argument
types, can give NumberFormatExceptions as a string gets passed to an int
argument.

Looking at the generated WSDL, the parameters are defined in an order a,b,
but are being passed in order b,a when it's actually called.

Is this a known bug? Has it been fixed in a CVS build of Axis? Can anyone
else
replicate it?


-- 
Be seeing you,
Sam.