Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

WSDLToJava Error: Rpc/Encoded WSDLs Are Not Supported with CXF

DZone's Guide to

WSDLToJava Error: Rpc/Encoded WSDLs Are Not Supported with CXF

Free Resource

Modernize your application architectures with microservices and APIs with best practices from this free virtual summit series. Brought to you in partnership with CA Technologies.

RPC/encoded is a vestige from before SOAP objects were defined with XML Schema. It’s not widely supported anymore. You will need to generate the stubs using Apache Axis 1.0, which is from the same era.

java org.apache.axis.wsdl.WSDL2Java http://someurl?WSDL

You will need the following jars or equivalents in the -cp classpath param:

  • axis-1.4.jar
  • commons-logging-1.1.ja
  • commons-discovery-0.2.jar
  • jaxrpc-1.1.jar
  • saaj-1.1.jar
  • wsdl4j-1.4.jar
  • activation-1.1.jar
  • mail-1.4.jar

This will generate similar stubs to wsimport.

Alternatively, if you are not using the parts of the schema that require rpc/encoded, you can download a copy of the WSDL and comment out those bits. Then run wsimport against the local file.

If you look at the WSDL, the following bits are using rpc/encoded:

<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

Sources

The Integration Zone is proudly sponsored by CA Technologies. Learn from expert microservices and API presentations at the Modernizing Application Architectures Virtual Summit Series.

Topics:

Published at DZone with permission of Singaram Subramanian, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}