解析使用Axis1.1和JAX WS wsimport生成的WSDL(使用带有Axis wsdl的wsimport生成客户端存根)

时间:2014-08-25 17:53:00

标签: java web-services wsdl axis wsimport

使用 Axis 1.1和JDK 1.3 公开当前的Web服务,我需要使用JDK1.6使用 wsimport 生成客户端代码。

我使用下面的命令使用JAX-WS和JDK1.6生成客户端存根     wsimport -keep CustomerFinder.wsdl

错误:

D:\StockQuote>wsimport -keep CustomerFinder.wsdl
parsing WSDL...

    [WARNING] src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component.
  line 2 of file:/D:/StockQuote/CustomerFinder.wsdl#types?schema2

[WARNING] src-resolve.4.2: Error resolving component 'tns1:CenttricException'. It was detected that 'tns1:CenttricException' is in namespace 'http://centtric.com', but components from this namespace are not referenceable from schema document 'file:/D:/StockQuote/CustomerFinder.wsdl#types?schema2'. If this is the incorrect namespace, perhaps the prefix of 'tns1:CenttricException' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/D:/StockQuote/CustomerFinder.wsdl#types?schema2'.
line 2 of file:/D:/StockQuote/CustomerFinder.wsdl#types?schema2

[ERROR] undefined simple or complex type 'soapenc:Array'
line 2 of file:/D:/StockQuote/CustomerFinder.wsdl

[ERROR] undefined attribute 'soapenc:arrayType'
line 2 of file:/D:/StockQuote/CustomerFinder.wsdl

[ERROR] undefined simple or complex type 'soapenc:Array'
line 2 of file:/D:/StockQuote/CustomerFinder.wsdl

[ERROR] undefined attribute 'soapenc:arrayType'
line 2 of file:/D:/StockQuote/CustomerFinder.wsdl

1 个答案:

答案 0 :(得分:0)

Axis 1.1和JAX-ws的规范/实现完全不同,使用Axis 1.x生成的WSDL文件无法由JAX-WS解析。