Search code examples
javaweb-serviceswsdlwsimport

wsimport "Cannot resolve the name..."


I've been trying to import the following web service: http://soap.genome.jp/KEGG.wsdl with ${JAVA_HOME}/bin/wsimport:

wsimport -version
JAX-WS RI 2.1.6 in JDK 6

but I got the following error:

parsing WSDL...

[WARNING] src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component.
  line 19 of http://soap.genome.jp/KEGG.wsdl#types?schema1

[ERROR] undefined simple or complex type 'soapenc:Array'
  line 19 of http://soap.genome.jp/KEGG.wsdl
(....)

Does the problem comes from the WSDL or from the implementation of wsimport ? should I use another tool ?

Thanks

Pierre


Solution

  • I found (what is apparently) a workaround from this bug report: https://netbeans.org/bugzilla/show_bug.cgi?id=116987

    Basically you need to add schemaLocaion to your import definition:

    <import namespace="http://schemas.xmlsoap.org/soap/encoding/"
            schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />