codependent
codependent

Reputation: 24442

WSWS4104E: SOAP 1.2 protocol not supported by SAAJ 1.2

I have a JAXWS client in a standalone application that is throwing:

Caused by: java.lang.UnsupportedOperationException: WSWS4104E: SOAP 1.2 Protocol is not supported by SAAJ 1.2.
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPFactory.setSOAPConstants(SOAPFactory.java:143)
    at com.ibm.ws.webservices.engine.xmlsoap.SOAPFactory.<init>(SOAPFactory.java:111)
    at com.ibm.ws.webservices.engine.soap.SAAJMetaFactoryImpl.newSOAPFactory(SAAJMetaFactoryImpl.java:68)
    at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:297)
    at com.sun.xml.internal.ws.api.SOAPVersion.<init>(SOAPVersion.java:176)
    at com.sun.xml.internal.ws.api.SOAPVersion.<clinit>(SOAPVersion.java:94)

I have added the following jar com.ibm.jaxws.thinclient_8.0.0.jar but still throws the same error.

Also tried adding these dependencies:

    <dependency>
        <groupId>com.sun.xml.messaging.saaj</groupId>
        <artifactId>saaj-impl</artifactId>
        <version>1.3.25</version>
    </dependency>
    <dependency>
        <groupId>javax.xml.soap</groupId>
        <artifactId>saaj-api</artifactId>
        <version>1.3.5</version>
    </dependency>

Even running under Oracle's JDK 1.8 and IBM JDK 1.7.

This is driving me crazy, any idea why it doesn't work?

Upvotes: 1

Views: 4364

Answers (1)

codependent
codependent

Reputation: 24442

After strugging with this I finally understood what was going on:

when using SOAP 1.2, the thin client tries to determine if SAAJ 1.3 is available.

com.ibm.ws.webservices.engine.xmlsoap.Utils

    private static final boolean isSAAJ13Available = discoverSAAJ13Availability();

discoverSAAJ13Availability() ends up trying to load com.ibm.ws.webservices.engine.xmlsoap.saaj13only.SOAPDynamicConstants which isn't on the classpath and finally raises the exception.

To solve it you also have to add the jar that contains that class: com.ibm.jaxws.thinclient_8.0.0.jar.

Upvotes: 1

Related Questions