axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Pilz <>
Subject Axis2 Java codegen tool fails to include message parts mapped to SOAP headers
Date Wed, 24 Dec 2008 19:12:36 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<body bgcolor="#ffffff" text="#000000">
<font face="Calibri">Hi,<br>
I'm new to Axis2 but I sort of know my way around SOAP etc. I'm trying
to build an Axis2 implementation of the Web Services Test Forum (WSTF) <a
scenario. The WSDL for this scenario is a little tricky. The Notify and
Echo messages contain two parts, the actual data to be sent and a
"SessionData" element that provides an app-level session ID. The
service is supposed to concatenate all the notify and echo data from a
given session and return it on the Echo operation. For example:<br>
Notify("foo", "session1")<br>
Notify("blub", "session2")<br>
Echo("baz", "session1") --&gt; returns "foobaz"<br>
So far, pretty simple. The tricky part is in the SOAP bindings where
the SessionData part is mapped to a SOAP header like so:<br>
</font><tt>&lt;wsdl:operation name="Notify"&gt;<br>
&nbsp; &lt;soap12:operation/&gt;<br>
&nbsp; &lt;wsdl:input&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;soap12:header use="literal" part="SessionData"
&nbsp;&nbsp;&nbsp; &lt;soap12:body use="literal" parts="Notify"/&gt;<br>
&nbsp; &lt;/wsdl:input&gt;<br>
</tt><font face="Calibri"><br>
</font><font face="Calibri">When I process this WSDL using the Axis2
codegen task it seems to work fine; there are no warnings etc. However,
the generated Java code doesn't reflect the presence of SessionData
element. Here's the server skeleton for the Notify method:<br>
&nbsp; * Auto generated method signature<br>
&nbsp; * <br>
&nbsp; * @param notify14<br>
&nbsp; */<br>
public void Notify( notify14)<br>
&nbsp;&nbsp;&nbsp; //TODO : fill this with the necessary business logic<br>
}</tt><font face="Calibri"><br>
This just seems wrong to me. I think the tool should either generate
code the accurately reflects the portType (i.e. including all the parts
of all the input and output messages) or it should warn you that it is
leaving something out.<br>
I'm using version 1.4.1 of Axis2. I'm invoking the codegen tool via ant
like so:<br>
</font><tt>&lt;taskdef name="codegen"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classname="org.apache.axis2.tool.ant.AntCodegenTask"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; classpathref="axis.classpath"/&gt;<br>
&lt;target name="compile.wsdl"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unless="wsdl.compiled"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; depends="init"&gt;<br>
&nbsp; &lt;codegen wsdlfilename="src/sc003.wsdl"<br>
&lt;/target&gt;</tt><font face="Calibri"><br>
Gilbert Pilz | SOA/WS Technologist | Oracle Corporation<br>

View raw message