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 Cédric CHABANOIS <cc...@natsystem.fr> on 2005/04/28 15:05:36 UTC

out parameters

Hi all !

I am using axis 1.2 RC3.

I have an operation on that is defined in the wsdd
<operation name="iBASIC11B" soapAction="">
   <parameter mode="inout" name="P11"/>
   <parameter name="P12"/>
   <parameter mode="out" name="P13"/>
   <parameter mode="inout" name="P21"/>
   <parameter name="P22"/>
   <parameter mode="out" name="P23"/>
   <parameter mode="inout" name="P31"/>
   <parameter name="P32"/>
   <parameter mode="out" name="P33"/>
  </operation>

Some parameters are out.
When this operation is invoked, i got an IllegalArgumentException : the 
arguments do not match the signature.

I debugged and I found that it was because ParameterDesc.order was set to -1 
for out parameters.
I modified OperationDesc.addParameter so that setOrder is called even if 
parameter is OUT

    public void addParameter(ParameterDesc param)
    {
        // Should we enforce adding INs then INOUTs then OUTs?
  param.setOrder(parameters.size());
  parameters.add(param);
        if ((param.getMode() == ParameterDesc.IN) ||
            (param.getMode() == ParameterDesc.INOUT)) {
   numInParams++;
        }
        if ((param.getMode() == ParameterDesc.OUT) ||
            (param.getMode() == ParameterDesc.INOUT)) {
            numOutParams++;
        }
       log.debug("@" + Integer.toHexString(hashCode())  + " added parameter 
 >" + param + "@" + Integer.toHexString(param.hashCode()) + "<total 
parameters:" +getNumParams());
    }

However, I am not sure about the meaning of order property. There was 
perhaps a reason why it was not set for out parameters.
So is this solution correct ?

If so, I will submit a patch along with a junit test.

Thanks,

Cédric