SOAPFaultElement | javax.xml.soap |
SAAJ 1.1; JWSDP 1.0, J2EE 1.4 |
public interface SOAPFaultElement extends SOAPElement { }
SOAPFaultElement is a subinterface of SOAPElement that represents an element that has been added directly to a SOAPFault . In all other respects, a SOAPFaultElement is the same as a SOAPElement . The Detail element, described earlier in this chapter, is an example of a SOAPFaultElement that can be created using the addDetail( ) method of the SOAPFault interface. There are two other ways to create a SOAPFaultElement :
Using the addChildElement( ) method that SOAPFault inherits from SOAPElement . For example, fault.addChildElement("BookError", "books" , " urn:BookService") creates and returns a SOAPFaultElement called BookError in the namespace urn:BookService , and also adds it to the SOAPFault element referenced by the variable fault .
Creating a SOAPElement using the methods of SOAPFactory or SOAPElementFactory and using addChildElement( ) to add it to a SOAPFault . In this case, the SOAPElement is replaced by an equivalent SOAPFaultElement , and any nested elements are copied .
Detail