axis web service parameters lose their names.

J

jeremy

I have written a method that I expose as an axis web service. The
parameter names in my java code do not get exported correctly to the
wsdl and I don't know why.

The java method syntax looks like:

public void UpdateIt(long lId, bool bGetBooleanFields)
{
}

and the wsdl looks like (snippets):

<wsdl:eek:utput message="impl:UpdateItResponse"
name="UpdateItResponse" />
</wsdl:eek:peration>

<wsdl:message name="UpdateItRequest">
<wsdl:part name="in0" type="xsd:long" />
<wsdl:part name="in1" type="xsd:boolean" />
</wsdl:message>
 
O

Owen Jacobson

I have written a method that I expose as an axis web service. The
parameter names in my java code do not get exported correctly to the
wsdl and I don't know why.

The java method syntax looks like:

public void UpdateIt(long lId, bool bGetBooleanFields)
{

}

and the wsdl looks like (snippets):

<wsdl:eek:peration name="UpdateIt" parameterOrder="in0 in1">
<wsdl:input message="impl:UpdateItRequest" name="UpdateItRequest" /

<wsdl:eek:utput message="impl:UpdateItResponse"
name="UpdateItResponse" />
</wsdl:eek:peration>

<wsdl:message name="UpdateItRequest">
<wsdl:part name="in0" type="xsd:long" />
<wsdl:part name="in1" type="xsd:boolean" />
</wsdl:message>

If you examine the .class file you'll discover that the method
bytecode does not include names for symbols, including parameters.
You need to annotate the individual method parameters with
@WebParam(name="foo") or use the corresponding XML configuration in
order to control the names in the generated WSDL and web service
invocation mapping.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top