While running wsdl2java I was getting below message:
I am using cxf 3.1 with jdk 7 my wsdl2java command is as below
wsdl2java -d C:\esub\.cxftmp/src -classdir C:\esub\build\classes -p http://www.example.org/ESBProxy/=org.example.esbproxy -impl -exsh false -dns true -dex true -wsdlLocation file:/C:/esub/WebContent/WSDL/ESBProxy.wsdl -verbose -sn ESBProxy -defaultValues -fe jaxws -db jaxb -wv 1.1 file:/C:/esub/WebContent/WSDL/ESBProxy.wsdl
output :
INFO: Operation {http://www.example.org/ESBProxy/}PublishOnESB cannot be unwrapped, input message must reference global element declaration with same localnameas operation.
below is my wsdl
<wsdl:portType name="ESBProxyPortType">
<wsdl:operation name="PublishOnESB">
<wsdl:input message="tns:NotifyRequest" />
<wsdl:output message="tns:NotifyResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ESBProxySOAPBinding" type="tns:ESBProxyPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="PublishOnESB" >
<soap:operation soapAction="http://www.example.org/ESBProxy/PublishOnESB" style="document"/>
<wsdl:input>
<soap:body parts="parameters" use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body parts="parameters" use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ESBProxy">
<wsdl:port binding="tns:ESBProxySOAPBinding" name="ESBProxyPort">
<soap:address location="http://www.example.org/" />
</wsdl:port>
</wsdl:service>