List of usage examples for javax.xml.soap DetailEntry addTextNode
public SOAPElement addTextNode(String text) throws SOAPException;
From source file:net.bpelunit.framework.control.util.BPELUnitUtil.java
/** * Creates a new, generic SOAP fault to be used when something goes wrong in a partner track and * other tracks must be notified.//from w ww .ja v a 2 s . c o m * * @return */ public static SOAPMessage generateGenericSOAPFault() { try { MessageFactory mFactory = MessageFactory.newInstance(); SOAPMessage message = mFactory.createMessage(); SOAPBody body = message.getSOAPBody(); SOAPFault fault = body.addFault(BPELUnitConstants.SOAP_FAULT_CODE_CLIENT, BPELUnitConstants.SOAP_FAULT_DESCRIPTION); Detail detail = fault.addDetail(); DetailEntry entry = detail .addDetailEntry(new QName("http://www.bpelunit.org/framework/error", "BPELUnitFault")); entry.addTextNode( "The BPELUnit test framework has detected a test failure or error. This test case is aborted."); return message; } catch (Exception e) { return null; } }