On Monday 03 March 2008, Bokde, Dhiraj wrote: > Hi Dan, > > What change do I need to make to my cxf.xml to use the workaround you > suggest? I tried just adding the bean, but apparently it doesn't have > a default ctor.
Right. Add a constructor-arg for it: <constructor-arg ref="cxf"/> That should do it. Dan > > Thanks, > Dhiraj. > > > -----Original Message----- > > From: Daniel Kulp [mailto:[EMAIL PROTECTED] > > Sent: Friday, February 29, 2008 12:47 PM > > To: [email protected] > > Cc: Bokde, Dhiraj > > Subject: Re: SOAPFaultException from Provider not written to SOAP > > response > > > It doesn't seem to be working anyway you look at it. I have a fix > > I'm > > > testing now. :-( > > > > The "workaround" right now that MIGHT work would be to use spring > > configuration to > > org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor > > to the outFaultChain of the service. That's what my fix is > > basically doing. Currently, in provider mode, the outFaultChain > > isn't putting the proper soap:env/body in place cause that > > interceptor is missing. > > > > Dan > > > > On Thursday 28 February 2008, Bokde, Dhiraj wrote: > > > Hi, > > > > > > I am using CXF version 2.0.4-incubator in an application that > > > implements the JAX-WS Provider<Source> interface. The application > > > throws a SOAPFaultException on error, but the client gets the HTTP > > > message below, which does not have a SOAP Envelope and hence > > > cannot > > be > > > > parsed. > > > > > > The code snippet that throws the SOAPFaultException is also > > included. > > > > What's the right way of creating and throwing a > > > SOAPFaultException? > > > > > > <snip> > > > Message errMessage = new Message("UNEXPECTED_ERROR", > > > BUNDLE, e.getMessage()); > > > LOG.error(errMessage, e); > > > Fault fault = new Fault(errMessage)); > > > SOAPFault soapFault = > > > SOAPFactory.newInstance().createFault(); > > > soapFault.setFaultCode(fault.getFaultCode()); > > > soapFault.setFaultString(fault.getMessage()); > > > throw new SOAPFaultException(soapFault); > > > <snip> > > > > > > <snip> > > > -------------------------------------- > > > Feb 28, 2008 1:03:57 PM > > > org.apache.cxf.interceptor.LoggingInInterceptor logging > > > INFO: Inbound Message > > > ---------------------------- > > > Encoding: UTF-8 > > > Headers: {Content-Length=[342], Server=[Jetty(6.1.6)], > > > content-type=[text/xml; c > > > harset=utf-8]} > > > Messages: > > > Message: > > > > > > Payload: <ns1:Fault > > > xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"><faultcode > > xmlns:ns2="http://cxf.apache.org/faultcode">ns2:server</faultcode><fau > > > >lt string>Invalid Request Message: [Line: -1, Column: -1: Empty XML > > > response from validation script: > > > identity.xslt].</faultstring></ns1:Fault> > > > -------------------------------------- > > > <snip> > > > > > > > > > Regards, > > > Dhiraj. > > > > > > Dhiraj Bokde > > > Principal Consultant > > > [EMAIL PROTECTED] > > > ---------------------------------------------------------- > > > IONA Technologies PLC > > > 1-800-ORBIX-4U > > > http://www.iona.com > > > Making Software Work Together > > > ---------------------------------------------------------- > > > > -- > > J. Daniel Kulp > > Principal Engineer, IONA > > [EMAIL PROTECTED] > > http://www.dankulp.com/blog -- J. Daniel Kulp Principal Engineer, IONA [EMAIL PROTECTED] http://www.dankulp.com/blog
