17

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

Pierre
  • 34,472
  • 31
  • 113
  • 192

2 Answers2

33

soapenc:Array indicates a non-standard style of web service encoding called "RPC Encoding". This is a very old style that used to be popular on Microsoft platforms; it's obsolete (i.e. it's not part of the WS-I spec) and not supported by modern tools like JAX-WS.

The only java tool that I know of that supports RPC encoded web services is Apache Axis 1.

skaffman
  • 398,947
  • 96
  • 818
  • 769
  • please tell me how can I convert a wsdl in RPC/Encoding style to some of the new supported style? – rineez May 28 '12 at 05:31
  • U could use the arcane Axis1 and then maybe write your own REST API on top of it. Why even bother with creating a wsdl? – Ustaman Sangat Jul 12 '12 at 22:19
6

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/" />
TastyWheat
  • 2,127
  • 1
  • 13
  • 12
  • Worked! But now i get another error! [ERROR] org.xml.sax.SAXParseException; systemId: http://schemas.xmlsoap.org/soap/encoding/; lineNumber: 1; columnNumber: 1; Premature end of file. – marcolopes Sep 28 '22 at 01:35