Alternative (to Axis 1.4) WSDL to Java 14 client generator that supports "RPC/encoded" format

Viewed 856

The Problems

Axis 1.4 & JDK 14

I'm trying to update our application from Java 8 to Java 14, and in doing so, I discovered that Axis 1.4 seems to generate client code that is no longer valid for the newer version of Java.

The issue boils down to Axis' use of com.sun.net.ssl.internal.ssl.Provider... when running on JDK 14, this throws a NoClassDefFoundError:

Caused by: java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider

RPC/encoded WSDLs

The WSDls that I'm trying to parse are from a 3rd party, and unfortunately they are RPC/encoded, which I didn't know until now, is a legacy, seemingly no longer supported, WSDL format.

Thus, my journey to find an alternative to Axis 1.4 - which gladly handles the legacy RPC/encoded format due to it being a very outdated library itself.


The Attempted Solutions

Looked For Replacement Jar

My first thought, was to research whether or not the com.sun.net.ssl.internal.ssl.Provider lives in a jar in maven central... similar to how some of the other built-in packages were moved to external jars in Java's more recent versions. I found that the package was removed as part of JDK-8218932, but my research fell short, and wasn't able to find a recommended dependency that I could use in it's place.

Other WSDL to Java Methods

Next I tried to use some of the other WSDL to Java generators that I found... Unfortunately, they all seem not to support the legacy RPC/encoded format that this 3rd party WSDL is.

javaws-maven-plugin

[ERROR] "Use of SOAP Encoding is not supported.
SOAP extension element on line 46 in file:/<path>/wsdl/kas.wsdl has use="encoded" "

cxf-codegen-plugin

Execution kas of goal org.apache.cxf:cxf-codegen-plugin:3.3.7:wsdl2java failed:
Rpc/encoded wsdls are not supported with CXF

Axis 2

Didn't bother attempting, because it clearly states on their website:

Note that Axis2 currently does not support the rpc/encoded style.

Ask The 3rd Party to Update WSDLs

I plan on reaching out to the 3rd party to see if they could update their WSDLs... however, they seem to currently be generated with Axis 1.3 as they have:

<!--WSDL created by Apache Axis version: 1.3

I'm not sure how to present to them exactly what they need to do in order to switch their system to a more recent style of WSDL. Additionally, I don't have much confidence in them being willing to change since they have multiple different versions we integrate with, and this would affect all their other clients that have integrations.


Thanks

Any suggestion will be greatly appreciated

0 Answers
Related