简体   繁体   English

对“此类不支持SAAJ 1.3”的修复不起作用

[英]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". 我正在尝试根据示例从Java方法发送肥皂请求,但得到“此类不支持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. 在maven依赖项中添加了saaj-impl-1.3.jar和saaj-api-1.3.jar。
 <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 将它们添加到我的java lib / ext文件夹中
  2. Added 添加

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

to my JAVA_OPTIONS in startWebLogic.sh. 到startWebLogic.sh中的JAVA_OPTIONS。 Stopped and restarted weblogic. 停止并重新启动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. 不需要设置其他属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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