我想使用 cxf,我正在尝试使用 cxf-codegen-plugin wsdl2java 从 maven 提供的 WSDL 生成客户端存根
问题是 targetNamespace 被命名为:
http://ip:port/ws/EndpointName.inbound.ws:companyName
和 maven generate-sources 阶段失败:
[ERROR] Failed to execute goal org.apache.cxf:cxf-codegen-plugin:2.7.5:wsdl2java (generate-jaxb) on project: Execution generate-jaxb of goal org.apache.cxf:cxf-codegen-plugin:2.7.5:wsdl2java failed: org.apache.cxf.tools.common.ToolException: : is not a valid char in the targetNamespace -> [Help 1]
我相信端点是使用 WebMethods 开发的。托管此 WS 端点的公司告诉我他们无法控制 targetNamespace。
我尝试更换
:companyName
经过
/companyName
客户端存根生成正常,但是当我尝试联系他们的服务器时出现错误:
Caused by: javax.ejb.EJBException: javax.xml.ws.WebServiceException: Could not find service named {http://ip:port/ws/EndpointName.inbound.ws/companyName}WebServiceName in wsdl http://ip:port/ws/EndpointName.inbound.ws:companyName?WSDL
任何想法?我应该切换到axis2以与WebMethods兼容吗?
非常感谢