Hi All,

 

I have a small doubt regarding the WSDL file generated using Java2WSDL
tool in Axis2 1.3. 

 

This is the simple interface with a single method which adds the 2 given
strings.

 

public interface ServiceInreface {

                String add(String s1, String s2);

}

 

I noticed that the WSDL generated using Java2WSDL tool, declares a
complex type as shown below.

 

<xs:element name="add">

   <xs:complexType>

     <xs:sequence>

        <xs:element minOccurs="0" name="param0" nillable="true"
type="xs:string"/>

        <xs:element minOccurs="0" name="param1" nillable="true"
type="xs:string"/>

     </xs:sequence>

   </xs:complexType>

</xs:element>

 

<wsdl:operation name="add">

            <soap:operation soapAction="urn:add" style="document"/>

 
........................................................................
........................................................................
..................

 
........................................................................
........................................................................
..................

 

This indicates that the input parameter to the method in skeleton or
stub generated from this WSDL will be a single object which in turn has
getter methods for 2 string parameters. I was just wondering if I can
generate the WSDL in such a way that it doesn't declare complex type for
simple data types like string.

 

I understand that we can use 'unwrapped' methodology to generate
skeleton such that it accepts 2 string parameters instead of a single
object, but Is there a way to generate the WSDL in such a way?

 

Any help or pointer will be of great help.

 

Thanks and Regards,

 

Ashish

 

Reply via email to