axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric CHABANOIS <cchaban...@natsystem.fr>
Subject out parameters
Date Thu, 28 Apr 2005 13:05:36 GMT
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 


 

Mime
View raw message