简体   繁体   中英

Fixes for “This class does not support SAAJ 1.3” do not work

I'm trying to send a soap request from a java method according to example but getting "This class does not support SAAJ 1.3". Others have reported this error but the recommended fixes did not work for me.

What have I tried?

  1. Added saaj-impl-1.3.jar and saaj-api-1.3.jar into maven dependencies.
 <dependency> <groupId>javax.xml.soap</groupId> <artifactId>saaj-api</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>com.sun.xml.messaging.saaj</groupId> <artifactId>saaj-impl</artifactId> <version>1.3</version> </dependency> 
  1. Added them into my java lib/ext folder
  2. Added

-Djavax.xml.soap.SOAPConnectionFactory=weblogic.wsee.saaj.SOAPConnectionFactoryImpl

to my JAVA_OPTIONS in startWebLogic.sh. Stopped and restarted weblogic.

Added

System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_3.SOAPMessageFactory1_3Impl");
System.setProperty("javax.xml.soap.SOAPConnectionFactory","weblogic.wsee.saaj.SOAPConnectionFactoryImpl");

To my code. Nothing worked. Still getting same message. These frameworks are supposed to save you time. Instead they do the opposite. Getting ready to do it the old way unless someone has an idea?

Turned out there was no

System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_3.SOAPMessageFactory1_3Impl");

By peaking inside the jar, I could see it should be

System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");

That worked. Did not need the other property to be set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM