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 2002/12/19 04:36:58 UTC

setting call parameters

hello,

i'm using the axis Call and Service objects for my web service calls.
in the method call.addParameter(paramName, xmlType, parameterMode), i wish 
to pass in a parameter of boolean type.

i.e.

paramName = "param1"
xmlType = org.apache.axis.Constants.XSD_BOOLEAN
parameterMode = ParameterMode.IN

my parameter value is set as a String

paramValue = "true"


when i invoke this call, the request message described the parameter type 
as xsd:string, not as xsd:boolean.
however, if i set the paramValue as a Boolean object i.e. paramValue = new 
Boolean("true"), then the parameter type
in the request message is xsd:boolean.

the question is ------> do i need to always pass in the parameter values 
into invoke() as the correct java class type?
why can't i just pass in the value as a String, and axis should be able to 
work out the type from xmlType?

thanks.

jin