Search code examples
javaweb-serviceswsdlaxiswsimport

Parsing WSDL generated using Axis1.1 with JAX WS wsimport (Generating Client stub using wsimport with Axis wsdl)


The current web services is exposed using Axis 1.1 and JDK 1.3, I need to generate Client code using wsimport using JDK1.6.

I am using below command to generate the Client stub using JAX-WS and JDK1.6 wsimport -keep CustomerFinder.wsdl

Error:

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

Solution

  • The specification/implemetation of Axis 1.1 and JAX-ws are completely different, The WSDL file generated using Axis 1.x cannot be parsed by JAX-WS.