-
1. Re: Webservices and ConversationId
baz Feb 11, 2009 2:49 PM (in response to baz)Now i have compiled and deployed the seam example seambay (Seam 2.1.1.GA on JBoss AS 4.2.3))
But this yields only an exception when a service on the webservice testpage is invoked14:46:05,732 ERROR [[AuctionService]] Servlet.service() for servlet AuctionService threw exception java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:441) at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:83) at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:171) at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:245) at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.exceptionToFaultMessage(SOAPFaultHelperJAXWS.java:174) at org.jboss.ws.core.jaxws.binding.SOAP11BindingJAXWS.createFaultMessageFromException(SOAP11BindingJAXWS.java:104) at org.jboss.ws.core.CommonSOAPBinding.bindFaultMessage(CommonSOAPBinding.java:671) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:488) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:284) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:201) at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:134) at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
-
2. Re: Webservices and ConversationId
ulath Feb 11, 2009 3:12 PM (in response to baz)cause of the problem is jdk incompatibility, (jboss-saaj.jar), i think this will help you http://thesmallpotato.blogspot.com/2007/06/jdk-16-jboss-420-ejb3-web-service-axis2.html
-
3. Re: Webservices and ConversationId
baz Feb 11, 2009 3:30 PM (in response to baz)Yes that solved the problem with the example. Thanks
But not my original problem with the empty header and no conversationId set. I am using the Client generated by wsimport. -
4. Re: Webservices and ConversationId
baz Feb 12, 2009 3:17 PM (in response to baz)Hello again,
the seambay example does work for us. So it is completly unclear to us why our service does not work.
Shane, why have you coded your message this way? If there is no header nothing is done:-(
SOAPHeader header = smc.getMessage().getSOAPHeader(); if (header != null) {
Perhaps i can understand what is going on in ourapp, when i knowe the intention behind the above test.
Thanks
Carsten -
5. Re: Webservices and ConversationId
baz Feb 17, 2009 9:00 AM (in response to baz)Our Webservice is a POJO webservice with a com.sun.xml.ws.transport.http.servlet.WSServlet (configured in web.xml) in front.
When a response should be send there is no soapheader, hence no conversationid is set.
We have implemented the following workaround.public class OurSOAPRequestHandler extends SOAPRequestHandler { @Override public boolean handleOutbound(MessageContext messageContext) { try { SOAPMessageContext smc = (SOAPMessageContext) messageContext; SOAPHeader header = smc.getMessage().getSOAPHeader(); // only add, if header not present if (header == null) { smc.getMessage().getSOAPPart().getEnvelope().addHeader(); } return super.handleOutbound(messageContext); } catch (SOAPException e) { return false; }}}
This class is configured in sun-jaxws.xml instead of the original. And voila there is the conversationid
Ciao,