Apache cxf错误“无法找到portType”,并且在targetNamespace中不是有效字符。

时间:2019-08-19 09:02:57

标签: cxf

我使用Apache cxf在SOAPUI(5.5.0)中生成代码,但在下面收到错误

apache-cxf-2.7.18错误

Aug 19, 2019 3:54:26 PM org.apache.cxf.wsdl11.WSDLServiceBuilder checkForWrapped
INFO: Operation {http://www.sterlingcommerce.com/mesa}executeT2B_GW_GETLIST_GIP cannot be unwrapped, input message must reference global element declaration with same localname as operation

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Could not find portType for binding {http://www.datapower.com/extensions/http://schemas.xmlsoap.org/wsdl/soap12/}GISBinding. Check wsdl for errors.

org.apache.cxf.tools.common.ToolException: org.apache.cxf.wsdl11.WSDLRuntimeException: Could not find portType for binding {http://www.datapower.com/extensions/http://schemas.xmlsoap.org/wsdl/soap12/}GISBinding. Check wsdl for errors.
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:420)
    at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: org.apache.cxf.wsdl11.WSDLRuntimeException: Could not find portType for binding {http://www.datapower.com/extensions/http://schemas.xmlsoap.org/wsdl/soap12/}GISBinding. Check wsdl for errors.
    at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:321)
    at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:196)
    at org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:172)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:229)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:164)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:412)
    ... 4 more

apache-cxf-2.7.2错误

WSDLToJava Error: org.apache.cxf.tools.common.ToolException: : is not a valid char in the targetNamespace

org.apache.cxf.tools.common.ToolException: org.apache.cxf.tools.common.ToolException: : is not a valid char in the targetNamespace
    at org.apache.cxf.tools.validator.internal.WSDLRefValidator.processSchemas(WSDLRefValidator.java:133)
    at org.apache.cxf.tools.validator.internal.WSDLRefValidator.<init>(WSDLRefValidator.java:109)
    at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:120)
    at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:204)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:182)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:142)
    at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:300)
    at org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
    at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
Caused by: org.apache.cxf.tools.common.ToolException: : is not a valid char in the targetNamespace
    at org.apache.cxf.tools.validator.internal.WSDLRefValidator.checkTargetNamespace(WSDLRefValidator.java:159)
    at org.apache.cxf.tools.validator.internal.WSDLRefValidator.processSchemas(WSDLRefValidator.java:131)
    ... 10 more

wsdl文件

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap11="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp200409="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsp200607="http://www.w3.org/2006/07/ws-policy" xmlns:ns0="http://www.datapower.com/extensions/http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://www.sterlingcommerce.com/mesa" targetNamespace="http://www.datapower.com/extensions/http://schemas.xmlsoap.org/wsdl/soap12/">
<wsdl:import location="request?ns1.wsdl" namespace="http://www.sterlingcommerce.com/mesa"/>
<wsdl:binding name="GISBinding" type="ns1:GISPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="executeT2B_GW_GETLIST_GIP">
<soap12:operation soapAction="sii:T2B_GW_GETLIST_GIP" soapActionRequired="true" style="document"/>
<wsdl:input name="executeT2B_GW_GETLIST_GIPRequest">
<soap12:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output name="executeT2B_GW_GETLIST_GIPResponse">
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>

我尝试搜索解决方案,但无法解决,有人可以帮助我。非常感谢。

0 个答案:

没有答案
相关问题