Codegen support for setting parameters withing Soap header blocks
-----------------------------------------------------------------

         Key: AXIS2-147
         URL: http://issues.apache.org/jira/browse/AXIS2-147
     Project: Apache Axis 2.0 (Axis2)
        Type: Improvement
  Components: wsdl  
    Versions: 0.9    
    Reporter: Gayan Asanka


Current WSDL2Java code generation doesn't facilitate to set arguments withing 
soap header blocks. 
i.e. when the wsdl looks like as follows, it's prefered to have mehtods such as

HeaderDocument header = HeaderDocument.factory.newInstance();
header.setHeaderBlock1(...object of HeaderBlock1Document);
HeaderBlock1.setString("axis");
...
 withing the stub.

A sample WSDL:-

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:tns="http://soapinterop.org/"; 
xmlns:types="http://soapinterop.org/xsd"; 
targetNamespace="http://soapinterop.org/";>
  <types>
    <s:schema elementFormDefault="qualified" 
targetNamespace="http://soapinterop.org/xsd";>
      <s:element name="echoStringParam" type="s:string"/>         
      <s:element name="echoStringReturn" type="s:string"/>
      <s:element name="Header1" type="types:Header1"/>
      <s:complexType name="Header1">
        <s:sequence>
          <s:element name="string" type="s:string"/>
          <s:element name="int" type="s:int"/>
        </s:sequence>
        <s:anyAttribute/>
      </s:complexType>
      <s:element name="Header2" type="types:Header2"/>
      <s:complexType name="Header2">
        <s:sequence>
          <s:element name="int" type="s:int"/>
          <s:element name="string" type="s:string"/>
        </s:sequence>
        <s:anyAttribute/>
      </s:complexType>
    </s:schema>
  </types>
  <message name="echoString">
        <part element="types:echoStringParam" name="a"/>
    </message>
    <message name="echoStringResponse">
        <part element="types:echoStringReturn" name="result"/>
    </message>
  <message name="Header1">
    <part name="Header1" element="types:Header1"/>
  </message>
  <message name="Header2">
    <part name="Header2" element="types:Header2"/>
  </message>
  <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>
  <service name="RetHeaderService">
    <port name="RetHeaderPort" binding="tns:RetHeaderBinding">
      <soap:address location=""/>
    </port>
  </service>
</definitions>

Gayan

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to