在java中创建SOAP webservice客户端

时间:2018-03-20 23:59:11

标签: java soap soap-client qlikview wsimport

我正在尝试使用wsimport为soap webservice创建客户端。但它会抛出如下错误。我怎么能强迫它生成。我可以在SOAP UI中调用服务,但由于此错误而无法生成客户端。我尝试使用Axis作为生成客户端的选项,它生成但不生成Object工厂类。

我无法更改XSD,因为它是COTS产品(或者我可以吗?)

parsing WSDL...


[WARNING] src-resolve.4.2: Error resolving component 'xs:schema'.
It was detected that 'xs:schema' is in namespace 'http://www.w3.org/2001/XMLSchema', 
but components from this namespace are not referenceable from schema document 'http://<<IP>>:4799/QMS/Service?xsd=xsd11'. 
If this is the incorrect namespace, perhaps the prefix of 'xs:schema' needs to be changed. 
If this is the correct namespace, then an appropriate 'import' tag should be added to 'http://<<IP>>:4799/QMS/Service?xsd=xsd11'.
line 1 of http://<<IP>>:4799/QMS/Service?xsd=xsd11

[WARNING] src-resolve: Cannot resolve the name 'xs:schema' to a(n) 'element declaration' component.
line 1 of http://<<IP>>:4799/QMS/Service?xsd=xsd11

[ERROR] undefined element declaration 'xs:schema'
line 1 of http://<<IP>>:4799/QMS/Service?xsd=xsd11

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)

0 个答案:

没有答案