Hi,

Can you show us how you have configured your endpoint "TransactionBegin" and
also the method signature of "begin".

Normally, by using CXF/JAXWS, the SOAPFault message should mapped to an
Exception. and in your code you must handle this exception.
If it's not the case, CXF won't be able to map your fault message to a java
exception.


2014-07-29 10:06 GMT+02:00 Jaishankar <jayashankar....@wipro.com>:

> Hi arnaudeprez,
> I'm not able to catch in catch block of code.
> I dont know how to implement with other two methods.
> *Here is my code*
> private void invokeTransactionBegin(Exchange exchange)   {
>                                 if (exchange == null) {
>                                         return;
>                                 }
>                                 ProducerTemplate producerTemplate =
> exchange.getContext().createProducerTemplate();
>                                 OperationContext operationContext = new
> OperationContext();
>                                 operationContext.set..
>
> exchange.getIn().setHeader(CxfConstants.OPERATION_NAMESPACE,"---");
>
> exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, "begin");
>                                 exchange.getIn().setBody(operationContext);
>                                 try {
>                                         producerTemplate.start();
>                                 } catch (Exception e) {
>                                         // TODO Auto-generated catch block
>                                         e.printStackTrace();
>                                 }
>                                 try {
>                                         Exchange exchangenew =
> producerTemplate.send("cxf:bean:TransactionBegin", exchange);
>
>                                         MessageContentsList contents =
> exchangenew.getOut().getBody(MessageContentsList.class);
>
>                                         LOG.info("transactionID  " +
> contents.get(0));
>                                 } catch (Exception exception) {
>                                         LOG.info("Handle Soap fault " +
> exception.getMessage());
>                                 }
>                                 try {
>                                         producerTemplate.stop();
>                                 } catch (Exception e) {
>                                         LOG.info("Exception " +
> e.getMessage());
>                                 }
>                         }
>
> In the exchangenew I'm getting Soapfault response and its not catching in
> catch block of code.
> Please look into the code and give me response ASAP.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Handle-SOAP-fault-message-tp5754549p5754563.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to