CXF错误:输入消息必须引用具有相同localnameas操作的全局元素声明

时间:2014-12-16 02:49:27

标签: web-services wsdl cxf jax-ws wsdl2java

在运行wsdl2java时,我收到了以下消息:

我正在使用cxf 3.1和jdk 7 我的wsdl2java命令如下所示

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

输出:

INFO: Operation {http://www.example.org/ESBProxy/}PublishOnESB cannot be unwrapped, input message must reference global element declaration with same localnameas operation.

下面是我的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>

0 个答案:

没有答案