camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vpd <vishnu_mit2...@yahoo.com>
Subject Re: CXF SOAP Fault handling
Date Tue, 06 Nov 2012 15:36:17 GMT
Thanks Willem for your quick response. We tried with no error handler but
even then routing aborted once SOAP fault is thrown.

I feel that I haven't provided the context clearly. Hence described below.

	We have a web service, which can return proper business fault or can raise
an exception as depicted in the below SOAP Responses. In CFX, is their way
to differentiate the BUSINESS FAULT from an Exception? 
As I understood, CFX treats all SOAP Fault responses as Exceptions and
aborts the chain.

Response 1 : Business Fault
<SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema "
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "> 
   <SOAP-ENV:Body> 
      <SOAP-ENV:Fault> 
         <faultcode>SOAP-ENV:Server</faultcode> 
         <faultstring>BAD ALBUM</faultstring> 
         <detail> 
            <ns2:FMT2 xmlns:ns2="http://test "> 
               <standard/> 
            </ns2:FMT2> 
         </detail> 
      </SOAP-ENV:Fault> 
   </SOAP-ENV:Body> 
</SOAP-ENV:Envelope>

Response 2 : Exception
<SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema "
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "> 
   <SOAP-ENV:Body> 
      <SOAP-ENV:Fault> 
         <faultcode>SOAP-ENV:Server</faultcode> 
         <faultstring>javax.ejb.EJBException: ASJ.ejb.005044 (Failed in
component: sap.com/Test2WSEAR) Exception raised from invocation of public
test.OrderItunes
test.ReceiveOrderTest2ImplBean.receiveOrderTest(test.OrderTest) throws
test.FMT2_Exception,test.FMT1_Exception method on bean instance
test.ReceiveOrderTest2ImplBean@7846c638  for bean
sap.com/Test2WSEAR*annotation|Test2WS.jar*annotation|ReceiveOrderTest2ImplBean
in application sap.com/Test2WSEAR.; nested exception is:
java.lang.RuntimeException: REALLY BAD SINGER!!</faultstring> 
         <detail> 
           
<yq1:com.sap.engine.interfaces.webservices.runtime.RuntimeProcessException
xmlns:yq1="http://sap-j2ee-engine/client-runtime-error
">javax.ejb.EJBException:
….</yq1:com.sap.engine.interfaces.webservices.runtime.RuntimeProcessException> 
         </detail> 
      </SOAP-ENV:Fault> 
   </SOAP-ENV:Body> 
</SOAP-ENV:Envelope>

If I have a route like this 
	<route id=””>
		<from uri=”…”>
		<to uri=”cfx:bean:beanName>
		<to uri=”component:other”>
	</route>

If the first cfx endpoint (cfx:bean:beanName) for invoking the web service,
returns a business fault,  I want to extract structure under <detail> and
pass it on the next processing(component:other).  How it can be achieved?
Currently, when a SOAP FAULT, occurs, CXF sets an Exception to the Exchange
and the camel pipeline will not move to the next processor.
(Soap11InFaultInterceptor sets the exception to Exchange.) 

-- vpd.



--
View this message in context: http://camel.465427.n5.nabble.com/CXF-SOAP-Fault-handling-tp5722219p5722235.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message