Thanks, I finally used an other approach using javax.xml.soap package
classes. It's not so bad as I thought. At least I don't need to construct
XML manually.

                catch(SOAPFaultException e)
                {
                                SOAPMessage soapMessage = 
MessageFactory.newInstance().createMessage();
                                SOAPPart soapPart = soapMessage.getSOAPPart();
                                SOAPEnvelope soapEnvelope = 
soapPart.getEnvelope();
                                soapEnvelope.getHeader().detachNode();
                                SOAPBody soapBody = soapEnvelope.getBody();
                                SOAPFault soapFault = e.getFault();
                                soapBody.addChildElement(soapFault);
                                Source response = soapPart.getContent();
                }


-- 
View this message in context: 
http://old.nabble.com/Dispatch---how-to-get-exception-as-soap-message-tp26525334p26674865.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to