Hi,

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) Notify-Echo 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:

Notify("foo", "session1")

Notify("blub", "session2")

Echo("baz", "session1") --> returns "foobaz"

So far, pretty simple. The tricky part is in the SOAP bindings where the SessionData part is mapped to a SOAP header like so:

<wsdl:operation name="Notify">
  <soap12:operation/>
  <wsdl:input>
    <soap12:header use="literal" part="SessionData" message="tns:Notify"/>
    <soap12:body use="literal" parts="Notify"/>
  </wsdl:input>
</wsdl:operation>

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:

/**
  * Auto generated method signature
  *
  * @param notify14
  */
public void Notify(org.wstf.www.docs.scenarios.sc002.Notify notify14)
{
    //TODO : fill this with the necessary business logic
}

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.

I'm using version 1.4.1 of Axis2. I'm invoking the codegen tool via ant like so:

<taskdef name="codegen"
         classname="org.apache.axis2.tool.ant.AntCodegenTask"
         classpathref="axis.classpath"/>

<target name="compile.wsdl"
        unless="wsdl.compiled"
        depends="init">
  <codegen wsdlfilename="src/sc003.wsdl"
           output="generated"
           serverside="true"
           generateservicexml="true"
           portName="soap12port"
           serverSideInterface="true"/>
</target>

Gilbert Pilz | SOA/WS Technologist | Oracle Corporation

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to