I tried to apply wsdl2java to the WSDL below. The WSDL operations
defined are both referring to the same type element as input message,
so the soap body are the same for both the messages. To solve this
collision, i added the soapAction to the binding, but the wsdl2java
seems to ignore it.
The message returned by the tool is:
WSDLToJava Error : Non unique body parts! In a port, operations must
have unique operation signaure on the wire for successful dispatch. In
port {urn:test}EchoTestPort, Operations "{urn:test}echoRequestB" and
"{urn:test}echoRequestA" have the same request body block
{urn:test}TRequestA
That's correct (if no soapAction is defined), but in my opinion
shouldn't be returned with the soapAction defined.
Marco.
<?xml version="1.0" encoding="UTF-8" standalone="no"?><definitions
xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://test.it"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding"
xmlns:tns="urn:test" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:test">
<types>
<xsd:schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="urn:test">
<xsd:complexType name="TypeA">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1"
name="dataBoolean" nillable="false" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="TypeB">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1"
name="dataString" nillable="false" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="TRequestA">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1"
name="typeA" nillable="false" type="tns:TypeA"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="TRequestB">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1"
name="typeB" nillable="false" type="tns:TypeB"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="TResponseAB">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" name="typeA"
type="tns:TypeA"/>
<xsd:element minOccurs="0" name="typeB"
type="tns:TypeB"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<message name="MRequestA">
<part element="tns:TRequestA" name="MRequestA">
</part>
</message>
<message name="MRequestB">
<part element="tns:TRequestB" name="MRequestB">
</part>
</message>
<message name="MRequestAB">
<part element="tns:TResponseAB" name="MRequestAB">
</part>
</message>
<portType name="EchoTestPortType">
<operation name="echoRequestA">
<input message="tns:MRequestA" name="echoRequestAIn">
</input>
<output message="tns:MRequestAB" name="echoRequestAOut">
</output>
</operation>
<operation name="echoRequestB">
<input message="tns:MRequestA" name="echoRequestBIn">
</input>
<output message="tns:MRequestAB" name="echoRequestBOut">
</output>
</operation>
</portType>
<binding name="EchoTestBinding" type="tns:EchoTestPortType">
<operation name="echoRequestA">
<wsdlsoap:operation soapAction="echoRequestA" style="document"/>
<input name="echoRequestAIn">
<wsdlsoap:body use="literal"/>
</input>
<output name="echoRequestAOut">
<wsdlsoap:body use="literal"/>
</output>
</operation>
<operation name="echoRequestB">
<wsdlsoap:operation soapAction="echoRequestB" style="document"/>
<input name="echoRequestBIn">
<wsdlsoap:body use="literal"/>
</input>
<output name="echoRequestBOut">
<wsdlsoap:body use="literal"/>
</output>
</operation>
</binding>
<service name="EchoTest">
<port binding="tns:EchoTestBinding" name="EchoTestPort">
<wsdlsoap:address location="http://localhost/fake_location"/>
</port>
</service>
</definitions>