| Package | Description | 
|---|---|
| javax.xml.soap | Provides the API for creating and building SOAP messages. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| Name | SOAPEnvelope. createName(String localName)Creates a new  Nameobject initialized with the
 given local name. | |
| abstract Name | SOAPFactory. createName(String localName)Creates a new  Nameobject initialized with the
 given local name. | |
| Name | SOAPEnvelope. createName(String localName,
          String prefix,
          String uri)Creates a new  Nameobject initialized with the
 given local name, namespace prefix, and namespace URI. | |
| abstract Name | SOAPFactory. createName(String localName,
          String prefix,
          String uri)Creates a new  Nameobject initialized with the
 given local name, namespace prefix, and namespace URI. | |
| Name | SOAPElement. getElementName()Returns the name of this  SOAPElementobject. | |
| Name | SOAPFault. getFaultCodeAsName()Gets the mandatory SOAP 1.1 fault code for this
  SOAPFaultobject as a SAAJNameobject. | 
| Modifier and Type | Method | Description | 
|---|---|---|
| SOAPElement | SOAPElement. addAttribute(Name name,
            String value)Adds an attribute with the specified name and value to this
  SOAPElementobject. | |
| SOAPBodyElement | SOAPBody. addBodyElement(Name name)Creates a new  SOAPBodyElementobject with the specified
 name and adds it to thisSOAPBodyobject. | |
| SOAPElement | SOAPElement. addChildElement(Name name)Creates a new  SOAPElementobject initialized with the
 givenNameobject and adds the new element to thisSOAPElementobject. | |
| DetailEntry | Detail. addDetailEntry(Name name)Creates a new  DetailEntryobject with the given
 name and adds it to thisDetailobject. | |
| SOAPFault | SOAPBody. addFault(Name faultCode,
        String faultString)Creates a new   SOAPFaultobject and adds it to thisSOAPBodyobject. | |
| SOAPFault | SOAPBody. addFault(Name faultCode,
        String faultString,
        Locale locale)Creates a new  SOAPFaultobject and adds it to
 thisSOAPBodyobject. | |
| SOAPHeaderElement | SOAPHeader. addHeaderElement(Name name)Creates a new  SOAPHeaderElementobject initialized with the
 specified name and adds it to thisSOAPHeaderobject. | |
| SOAPElement | SOAPElementFactory. create(Name name)Deprecated. 
 Use
 javax.xml.soap.SOAPFactory.createElement(javax.xml.soap.Name)
 instead | |
| abstract SOAPElement | SOAPFactory. createElement(Name name)Creates a  SOAPElementobject initialized with the
 givenNameobject. | |
| String | SOAPElement. getAttributeValue(Name name)Returns the value of the attribute with the specified name. | |
| Iterator | SOAPElement. getChildElements(Name name)Returns an  Iteratorover all the immediate childNodes of this element with the specified name. | |
| boolean | SOAPElement. removeAttribute(Name name)Removes the attribute with the specified name. | |
| void | SOAPFault. setFaultCode(Name faultCodeQName)Sets this  SOAPFaultobject with the given fault code. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2025, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.