开发者

Web Service Client in JBoss

开发者 https://www.devze.com 2023-03-18 17:34 出处:网络
I have an application deployed in JBoss (5.1.0.GA) that contains a web service client. The library that is making web service calls was provided as a compiled J开发者_如何转开发AR, so I can\'t make an

I have an application deployed in JBoss (5.1.0.GA) that contains a web service client. The library that is making web service calls was provided as a compiled J开发者_如何转开发AR, so I can't make any changes to its implementation. I am working with AXIS 1.4, and things work alright outside of JBoss. After I deploy and try to perform an operation which triggers a web service call, I get this exception:

javax.xml.soap.SOAPException: Unable to create message factory for SOAP: org.jboss.ws.core.soap.MessageFactoryImpl cannot be cast to javax.xml.soap.MessageFactory

Can I make a change to the configuration of my application to tell it not to use the saaj implementation provided by JBoss? I want to try to avoid making server-wide changes since there are several other applications deployed there that I don't want to mess with.


In Jboss 5 you have the option of creating a custom classloading file, jboss-classloading.xml for your deployable resource. So if your compiled jar is packaged inside your WAR/EAR, you can instruct JBoss to use the saaj implementation in this jar, rather than the server library. This article does a pretty good job of describing how it works:

http://phytodata.wordpress.com/2010/10/21/demystifying-the-jboss5-jboss-classloading-xml-file/

0

精彩评论

暂无评论...
验证码 换一张
取 消