cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Vest Hansen" <karmazi...@gmail.com>
Subject Re: Unable to create message factory for SOAP
Date Fri, 17 Aug 2007 11:02:08 GMT
So I take it sun saaj should work.

Then, can you explain the error I get bellow? I can see in my log that
my web service operation was invoked successfuly, but somehow things
go avry when the result of the operation is to be returned/transmitted
back to the caller:

12:57:21,940 DEBUG [HandlerPipeline] Invoking handler
org.codehaus.xfire.service.binding.PostInvocationHandler in phase
service
12:57:21,941 DEBUG [HandlerPipeline] Invoking phase post-invoke
12:57:21,941 DEBUG [HandlerPipeline] Invoking handler
org.codehaus.xfire.soap.handler.SoapSerializerHandler in phase
post-invoke
12:57:21,941 DEBUG [HandlerPipeline] Invoking phase policy
12:57:21,941 DEBUG [HandlerPipeline] Invoking phase user
12:57:21,941 DEBUG [HandlerPipeline] Invoking phase transport
12:57:21,941 DEBUG [HandlerPipeline] Invoking handler
org.codehaus.xfire.soap.handler.SoapActionOutHandler in phase
transport
12:57:21,941 DEBUG [HandlerPipeline] Invoking phase send
12:57:21,941 DEBUG [HandlerPipeline] Invoking handler
org.codehaus.xfire.handler.OutMessageSender in phase send
12:58:23,118 ERROR [STDERR] Aug 17, 2007 12:58:23 PM
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
java.lang.UnsupportedOperationException
	at com.sun.xml.messaging.saaj.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:70)
	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:82)
	at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:63)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
	at org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:139)
	at org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)
	at org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:613)




2007/8/17, Liu, Jervis <jliu@iona.com>:
> Sun's SAAJ impl should be ok. CXF has been using Sun's SAAJ as default since CXF's inception.
>
> > -----Original Message-----
> > From: Christian Vest Hansen [mailto:karmazilla@gmail.com]
> > Sent: 2007年8月17日 17:12
> > To: cxf-user@incubator.apache.org
> > Subject: Re: Unable to create message factory for SOAP
> >
> >
> > I stuck that in a JSP file and added an import.
> >
> > When I run that it gives a root complaint much like the one
> > in my previous mail:
> >
> > javax.xml.soap.SOAPException: Unable to create message factory for
> > SOAP: org.jboss.ws.core.soap.MessageFactoryImpl
> >       javax.xml.soap.MessageFactory.newInstance(Unknown Source)
> >       org.apache.jsp.index_jsp._jspService(index_jsp.java:59)
> >
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> >       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServlet
> > Wrapper.java:387)
> >
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> > .java:320)
> >
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
> >       javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyH
> > eaderFilter.java:96)
> >
> >
> >
> > Another thing worth noting is that I've come upon the ability to
> > change which implementation class should be used by
> > MessageFactory.getInstance() using a systems property, for instance:
> >
> >     System.setProperty("javax.xml.soap.MessageFactory",
> >         "com.sun.xml.messaging.saaj.soap.MessageFactoryImpl");
> >
> > Since I write the interceptor myself, I could do some hacky magic to
> > make sure that the SAAJ interceptor got initialized with the correct
> > MessageFactory, but in that case, which MessageFactory should I use?
> > The SUN one above dosn't seem to quite cut it either.
> >
> >
> > 2007/8/17, Liu, Jervis <jliu@iona.com>:
> > > Not familiar with JBOSS, look likes JBOSS has its own SAAJ
> > impl, and the exception was caused by initializing the
> > MessageFactory. I suggest you try following code in your
> > JBOSS env to see what happens:
> > >
> > >             MessageFactory factory = MessageFactory.newInstance();
> > >
> > > Cheers,
> > > Jervis
> > >
> > >
> > > > -----Original Message-----
> > > > From: Christian Vest Hansen [mailto:karmazilla@gmail.com]
> > > > Sent: 2007年8月16日 23:06
> > > > To: cxf-user@incubator.apache.org
> > > > Cc: mdr@unwire.com
> > > > Subject: Unable to create message factory for SOAP
> > > >
> > > >
> > > > Hello people,
> > > >
> > > > I'm writing an interceptor to do some custom WS-Secutity
> > integration
> > > > to our single sign-on system, and my interceptor is based on the
> > > > WSS4JInInterceptor.
> > > >
> > > > But alas, I'm having some trouble getting it to work.
> > > >
> > > > In the constructor for my interceptor, I specify my phase and a
> > > > dependency on the SAAJInInterceptor like this:
> > > >
> > > >         setPhase(Phase.PRE_PROTOCOL);
> > > >         getAfter().add(SAAJInInterceptor.class.getName());
> > > >
> > > > And my jaxws:endpoint in my beans.xml (in an example web service)
> > > > looks like this:
> > > >
> > > >     <jaxws:endpoint
> > > >         id="webStatServiceEndpoint"
> > > >         implementor="#webStatService"
> > > >         address="/WebStat"
> > > >         wsdlLocation="classpath:WebStat1.0.wsdl">
> > > >         <jaxws:inInterceptors>
> > > >             <ref bean="casInterceptor"/>
> > > >             <bean
> > > > class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
> > > >         </jaxws:inInterceptors>
> > > >     </jaxws:endpoint>
> > > >
> > > > That is all dandy, so I built my project (the demo web
> > service) with
> > > > maven and deploy it on my jboss, but when I try to invoke the web
> > > > service, this happens:
> > > >
> > > > 16:30:39,692 ERROR [STDERR] Aug 16, 2007 4:30:39 PM
> > > > org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> > > > INFO: Interceptor has thrown exception, unwinding now
> > > > org.apache.cxf.binding.soap.SoapFault:
> > > > SOAPHANDLERINTERCEPTOR_EXCEPTION
> > > >       at
> > > > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessa
> > > > ge(SAAJInInterceptor.java:114)
> > > >       at
> > > > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessa
> > > > ge(SAAJInInterceptor.java:63)
> > > >       at
> > > > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIn
> > > > terceptorChain.java:207)
> > > >       at
> > > > org.apache.cxf.transport.ChainInitiationObserver.onMessage(Cha
> > > > inInitiationObserver.java:73)
> > > >       at
> > > > org.apache.cxf.transport.servlet.ServletDestination.doMessage(
> > > > ServletDestination.java:78)
> > > >       at
> > > > org.apache.cxf.transport.servlet.ServletController.invokeDesti
> > > > nation(ServletController.java:231)
> > > >       at
> > > > org.apache.cxf.transport.servlet.ServletController.invoke(Serv
> > > > letController.java:139)
> > > >       at
> > > > org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.
> > > > java:271)
> > > >       at
> > > > org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.
> > > > java:249)
> > > >       at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> > > >       at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > > >       at
> > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> > > > er(ApplicationFilterChain.java:290)
> > > >       at
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> > > > cationFilterChain.java:206)
> > > >       at
> > > > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyH
> > > > eaderFilter.java:96)
> > > >       at
> > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilt
> > > > er(ApplicationFilterChain.java:235)
> > > >       at
> > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli
> > > > cationFilterChain.java:206)
> > > >       at
> > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardW
> > > > rapperValve.java:230)
> > > >       at
> > > > org.apache.catalina.core.StandardContextValve.invoke(StandardC
> > > > ontextValve.java:175)
> > > >       at
> > > > org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(
> > > > SecurityAssociationValve.java:179)
> > > >       at
> > > > org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccCont
> > > > extValve.java:84)
> > > >       at
> > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHost
> > > > Valve.java:128)
> > > >       at
> > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport
> > > > Valve.java:104)
> > > >       at
> > > > org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(
> > > > CachedConnectionValve.java:156)
> > > >       at
> > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEn
> > > > gineValve.java:109)
> > > >       at
> > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap
> > > > ter.java:241)
> > > >       at
> > > > org.apache.coyote.http11.Http11Processor.process(Http11Process
> > > > or.java:844)
> > > >       at
> > > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> > > > r.process(Http11Protocol.java:580)
> > > >       at
> > > > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.
> > > > java:447)
> > > >       at java.lang.Thread.run(Thread.java:613)
> > > > Caused by: javax.xml.soap.SOAPException: Unable to create message
> > > > factory for SOAP: org.jboss.ws.core.soap.MessageFactoryImpl
> > > >       at javax.xml.soap.MessageFactory.newInstance(Unknown Source)
> > > >       at
> > > > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessa
> > > > ge(SAAJInInterceptor.java:77)
> > > >       ... 28 more
> > > >
> > > >
> > > >
> > > > So, any helpful thoughts?
> > > >
> > > > --
> > > > Venlig hilsen / Kind regards,
> > > > Christian Vest Hansen.
> > > >
> > >
> > > ----------------------------
> > > IONA Technologies PLC (registered in Ireland)
> > > Registered Number: 171387
> > > Registered Address: The IONA Building, Shelbourne Road,
> > Dublin 4, Ireland
> > >
> >
> >
> > --
> > Venlig hilsen / Kind regards,
> > Christian Vest Hansen.
> >
>
> ----------------------------
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>


-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.
Mime
View raw message