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 Ajith Ranabahu <aj...@gmail.com> on 2005/08/29 07:57:54 UTC
[Axis2] handling header parameters
Hi all,
Another confusing issue :).
Have a look at the following section of WSDL that I extracted from
http://soapinterop.java.sun.com/round3/groupf/headers?WSDL
<portType name="RetHeaderPortType">
<operation
name="echoString">
<input message=
"tns:echoString"/>
<output message="tns:echoStringResponse"
/>
</operation>
</portType>
<binding
name="RetHeaderBinding" type="tns:RetHeaderPortType">
<
soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<operation name=
"echoString">
<soap:operation soapAction="http://soapinterop.org/"
style="document"/>
<input>
<
soap:body use="literal"/>
<soap:header
message="tns:Header1" part="Header1"
use=
"literal"/>
<soap:header message=
"tns:Header2"
part="Header2" use="literal"
/>
</input>
<output>
<soap:body
use=
"literal"/>
</output>
</operation>
</binding>
As you can see the binding requires two parameters going in the headers but
the porttype is clueless about it. If you think about it, the generated
method signature should contain the two header parameters as well. However
in the currrent impl I look at the porttype (interface in WSDL
2.0terminology) for the method signature which seems to be
inconsistent in this
case. I've gone through the JAX-WS spec and their recommendation is to have
such header parameters as input parameters in the method signature.
To make things right this is what I plan to do.
1. Modify the code to automatically select between the binding and the
portype (interface). the default behavior would be to take the binding if
present.
2. Add a switch to force the code generation with the porttype if the user
wishes to override the above mentioned behavior.
Strangely I could not find the correct switch for the Axis 1.x code
generator. I've tried with several switches but it never included the header
parameters in the signatures.
--
Ajith Ranabahu