简体   繁体   English

不允许混合使用XOP / MTOM和附件

[英]Mixing of XOP/MTOM and attachments is not allowed

Our application sends file attachment to a web service using SOAP. 我们的应用程序使用SOAP将文件附件发送到Web服务。 The service is running on Oracle Service Bus 11g. 该服务在Oracle Service Bus 11g上运行。 We are using Spring WS + SAAJ + MTOM on client to send the request. 我们正在客户端上使用Spring WS + SAAJ + MTOM发送请求。

The application works fine on local and tomcat server, however, when we move the application to weblogic 12c server (war deployed), we see the following error when we hit the service. 该应用程序可以在本地和tomcat服务器上正常运行,但是,当我们将应用程序移至weblogic 12c服务器(已部署战争)时,点击服务时会看到以下错误。

BEA-382120 Error: Mixing of XOP/MTOM and attachments is not allowed! BEA-382120错误:不允许混合使用XOP / MTOM和附件!

It seems when it is deployed on the WebLogic the message no longer has MTOM enabled. 看来,当将其部署在WebLogic上时,消息不再启用MTOM。

======================== ========================

Some additional information that might be helpful: 一些其他信息可能会有所帮助:

Spring WS configuration, libs used: spring-ws-1.5.8.jar commons-httpclient-3.1.jar Spring WS配置,使用的库:spring-ws-1.5.8.jar commons-httpclient-3.1.jar

Thanks in advance. 提前致谢。

After more investigation, it seems that weblogic overrides some of the classes or somehow confuses the classpath. 经过更多调查后,似乎weblogic会覆盖某些类或以某种方式混淆了类路径。 In our case it was Saaj implementation. 在我们的案例中,这是Saaj的实现。 We had to add the saaj-impl-1.3.20.jar into our class-path and it worked. 我们必须将saaj-impl-1.3.20.jar添加到我们的类路径中,并且可以正常工作。 We also upgraded to spring-ws 2.2.0 and set the mtom to enable on the marshaller from the xml file. 我们还升级到spring-ws 2.2.0 ,并将mtom设置为从xml文件在marshaller上启用。

You can also add this jar in your setDomainEnv.cmd file of your weblogic folder 您也可以将此jar添加到weblogic文件夹的setDomainEnv.cmd文件中

set EXT_PRE_CLASSPATH=%DOMAIN_HOME%\\lib\\saaj-impl-1.3.20.jar 设置EXT_PRE_CLASSPATH =%DOMAIN_HOME%\\ lib \\ saaj-impl-1.3.20.jar

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

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