Previous section   Next section
DetailEntry javax.xml.soap

SAAJ 1.1; JWSDP 1.0, J2EE 1.4
public interface DetailEntry extends SOAPElement {
}

DetailEntry is a SOAPElement that provides application-specific information relating to a SOAP fault. A DetailEntry is always contained by and can only be created from a Detail element. There is no predefined SOAP element that corresponds to a DetailEntry�instead, the element name and its namespace are supplied when it is created.

Since the DetailEntry interface is derived from SOAPElement, applications may nest Text nodes or other SOAPElements inside a DetailEntry and may also attach attributes and namespace declarations to it. The following code extract creates a DetailEntry and adds to it a single Text node. In this code, detail is assumed to be a reference to a Detail object, and factory is assumed to be a reference to a SOAPFactory:

DetailEntry entry = detail.addDetailEntry(    
           factory.createName("BookError", "books", "urn:BookService"));
entry.addTextNode("Book title not known");

Here is how this would look in the resulting SOAP message, where the <detail> tag corresponds to the containing Detail element:

<detail>
       <books:BookError xmlns:books="urn:BookService">Book title not known
        </books:BookError>
</detail>

Returned By

Detail.addDetailEntry( )


  Previous section   Next section