View Full Version : SpringWS + Weblogic
decrypt
Jun 22nd, 2006, 11:20 AM
Hey guys,
I'm attempting to set up a web service on weblogic 8.1 SP4...I've got mine up and running on tomcat just fine...but with weblogic I get the following exception when my client tries to utilize the service:
javax.xml.soap.SOAPException: There should be only one Content-Type MimeHeader
at weblogic.webservice.core.soap.SOAPMessageImpl.getC ontentType()
at weblogic.webservice.core.soap.SOAPMessageImpl.<init>
at weblogic.webservice.core.soap.MessageFactoryImple. createMessage()
at org.springframework.ws.soap.saaj.SaajSoapMessageCo ntextFactory.createContext()
I've openned a sniffer up and there is only one MimeType set (text/xml) in the HTTP message.
Any ideas? Thanks!
Andrew
decrypt
Jun 22nd, 2006, 01:27 PM
I read elsewhere that "Content-Type" errors can come from saaj version incompatiblities and weblogic does use an old version.
I've change WebLogic to use different Jars and set a system property to use AXIS as it's MessageFactory...i've gotten much further but now I'm getting some other errors...i may post some questions about those later...
If anyone has had luck getting SpringWS working with Weblogic's out of the box configuration i'd be interested in hearing about it.
Arjen Poutsma
Jun 22nd, 2006, 05:36 PM
I read elsewhere that "Content-Type" errors can come from saaj version incompatiblities and weblogic does use an old version.
I've change WebLogic to use different Jars and set a system property to use AXIS as it's MessageFactory...i've gotten much further but now I'm getting some other errors...i may post some questions about those later...
If anyone has had luck getting SpringWS working with Weblogic's out of the box configuration i'd be interested in hearing about it.
Hmm, this sounds like a compatibility issue in the SaajSoapMessageFactory that should be solved. Could you file an issue for this?
You might also want to try the SAAJ reference implementation, which is shipped with the Spring-WS distribution (saaj-impl.jar). In order to use those, you must instruct the app server to use the jars provided in WEB-INF/lib before using the jars provided by the app server itself. There should be a setting in WebLogic to do so.
Thanks,
Arjen Poutsma
Jun 24th, 2006, 08:11 PM
I've created an issue ("http://opensource.atlassian.com/projects/spring/browse/SWS-37') for the MimeHeaders bug, which is now fixed.
I've even gotten the Echo sample to work under WL 8.1, but it takes a lot of work. You basically have to override every XML api provided WL, and use more recent versions instead. This includes the following:
javax.xml.namespace.QName (provided by stax-api.jar, for instance),
Xerces 2.8.0
Xalan 2.7.0
xml-apis 1.3.0.3
All of these have to be in the WEB-INF/lib. Additionally, you need to use the AxiomSoapMessageFactory instead of the SaajSoapMessageFactory. And you have to put this in the weblogic.xml:
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
After all these steps, it worked for me.
Let me know if you need more help.
routis
Jun 24th, 2006, 08:34 PM
I had similar problems using spring-oxm and JaxMe JAXB implementation. Weblogic dependency to Xerces cannot be updated to 2.8.0.
So the only solution that worked for me was putting the xerces jar in web-inf/lib or ear and using the weblogic instruction that Arjen mentioned
decrypt
Jun 25th, 2006, 12:02 PM
I will try this solution tomorrow. I had this almost working by replacing some of those jars....with things provided by axis1.3 and a newer saaj.jar...but I was having an exception being thrown after xml parsing completed and the response was being generated. That exception occured when I attempted to have the getResponse method of my extension of AbstractSaxPayloadEndpoint to actually do something other than return null...although I'm believing it's still a library issue at this point. I'll try your combination of libraries and report back.
Thanks again for all your time!
Andrew
Vignesh.kc@gmail.com
Jun 13th, 2007, 02:29 PM
Can you explain how this was fixed ?
Thanks
Vignesh
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.