axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Butek" <bu...@us.ibm.com>
Subject Relationships between addParameter/setReturnType/invoke
Date Thu, 03 Jan 2002 19:58:31 GMT
There are a lot of problems with the Call object and parameters in the
JAX-RPC spec.  Now that I'm trying to implement the parameterOrder updates
in JAX-RPC, I'm running into some of these problems.  Here's one.
JAX-RPC's Call object, as of version 0.6, now has a getOutputParams method.
This is good.  We already found a need for one in AXIS and implemented it,
so the spec is getting closer to reality.  They're a little different - the
AXIS one returns a Vector while the JAX-RPC one returns a Map - but that's
easy to remedy.  But there's another question about this method and the
return from invoke.

Say we call:

    call.addParameter(
        "var1",
        new XMLType(new QName("http://www.w3.org/1999/XMLSchema", "int")),
        Call.PARAM_MODE_OUT);
    call.setReturnType(
        new XMLType(new QName("http://www.w3.org/1999/XMLSchema", "int")));

Then after calls to:

    Object ret = call.invoke(...);
    Map output = call.getOutputParams();

ret will be non-null and output would be a map that contains one element.

But if we did:

    call.addParameter(
        "var1",
        new XMLType(new QName("http://www.w3.org/1999/XMLSchema", "int")),
        Call.PARAM_MODE_OUT);
    call.addParameter(
        "var2",
        new XMLType(new QName("http://www.w3.org/1999/XMLSchema", "int")),
        Call.PARAM_MODE_OUT);

(notice there's no call to setReturnType) then after calls to:

    Object ret = call.invoke(...);
    Map output = call.getOutputParams();

I would expect ret to be null (since we didn't set a return type) and
output to be a map that contains two elements.  HOWEVER, our implementation
of Call ALWAYS returns the first resArgs element and puts the rest into the
outputParams Vector regardless of what addParameter/setReturnType calls
were made.

This seems wrong to me and I would like to fix it unless someone can
enlighten me on why I should leave it alone.

Russell Butek
butek@us.ibm.com


Mime
View raw message