我正在尝试从http://webservices.solidcommerce.com/ws.asmx?wsdl构建Java SOAP客户端
我相信这是Microsoft工具开发的WSDL。我试图将Microsoft工具生成的WSDL与Java多次结合使用,但总是失败。当我使用Microsoft / Mono / C#“ wsdl”工具时,它可以正常工作。我无法使Java的“ wsimport”正常工作。
非常感谢能够使用Java在上述URL上使用WSDL的任何帮助。
谢谢!
我在这种情况下遇到的错误是:
$ wsimport -keep -verbose http://webservices.solidcommerce.com/ws.asmx?wsdl
parsing WSDL...
[...]
[ERROR] undefined element declaration 's:schema'
line 2634 of http://webservices.solidcommerce.com/ws.asmx?wsdl
[ERROR] undefined element declaration 's:schema'
line 2775 of http://webservices.solidcommerce.com/ws.asmx?wsdl
[ERROR] undefined simple or complex type 'soapenc:Array'
line 5166 of http://webservices.solidcommerce.com/ws.asmx?wsdl
Exception in thread "main" com.sun.tools.internal.ws.wscompile.AbortException
at com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:129)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2283)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:183)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:126)
at com.sun.tools.internal.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:429)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:190)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:159)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:42)