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 Jin Voon <Ji...@orderware.net> on 2003/01/10 03:07:02 UTC
Is this a feature or bug in Axis?
Hi all,
I'm writing a simple web service in Axis to test RPC web service calls
with different parameter modes.
I have this web service method:
public int addIntegerAllModes(int inParam, IntHolder outParam, IntHolder
inOutParam)
{
int numberToAdd = 10;
outParam.value = inParam + numberToAdd;
inOutParam.value = inOutParam.value + numberToAdd;
return 123;
}
As you can see, i'm passing in parameters which uses all three modes - IN,
OUT and INOUT
The deployment descriptor is:
<operation name="addIntegerAllModes">
<parameter name="inParam" mode="IN" />
<parameter name="outParam" mode="OUT" />
<parameter name="inOutParam" mode="INOUT" />
</operation>
I'm calling this using DII, and only pass in parameter values for the IN
and INOUT parameters, with the values 6 and 2 respectively. The soap
request message generated is:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:addIntegerAllModes
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://orderware.net/junit">
<inParam xsi:type="xsd:int">6</inParam>
<inOutParam xsi:type="xsd:int">2</inOutParam>
</ns1:addIntegerAllModes>
</soapenv:Body>
</soapenv:Envelope>
As you can see, this message is correct. However, the soap response I got
is:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:addIntegerAllModesResponse
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://orderware.net/junit">
<addIntegerAllModesReturn
xsi:type="xsd:int">123</addIntegerAllModesReturn>
<inOutParam xsi:type="xsd:int">16</inOutParam>
<outParam xsi:type="xsd:int">10</outParam>
</ns1:addIntegerAllModesResponse>
</soapenv:Body>
</soapenv:Envelope>
As you can see, the result is WRONG! The outParam should be 16 and the
inOutParam should be 12, according to the addIntegerAllModes() method.
Seems to me like it's confused the value assignment i.e.
inParam = 6
outParam = 2
inOutParam = 0
instead of
inParam = 6
outParam = 0 (not set in the invoke)
inOutParam = 2
Is this an Axis bug? At this point I'm thinking it is.....but I might be
wrong. Thanks for any help!
Regards,
Jin