All Implemented Interfaces:
Node, SOAPBodyElement, SOAPElement, SOAPFault, Element, Node

public class Fault1_2Impl extends FaultImpl
  • Constructor Details

  • Method Details

    • getDetailName

      protected NameImpl getDetailName()
      Specified by:
      getDetailName in class FaultImpl
    • getFaultCodeName

      protected NameImpl getFaultCodeName()
      Specified by:
      getFaultCodeName in class FaultImpl
    • getFaultStringName

      protected NameImpl getFaultStringName()
      Specified by:
      getFaultStringName in class FaultImpl
    • getFaultActorName

      protected NameImpl getFaultActorName()
      Specified by:
      getFaultActorName in class FaultImpl
    • createDetail

      protected DetailImpl createDetail()
      Specified by:
      createDetail in class FaultImpl
    • createSOAPFaultElement

      protected FaultElementImpl createSOAPFaultElement(String localName)
      Specified by:
      createSOAPFaultElement in class FaultImpl
    • checkIfStandardFaultCode

      protected void checkIfStandardFaultCode(String faultCode, String uri) throws SOAPException
      Specified by:
      checkIfStandardFaultCode in class FaultImpl
      Throws:
      SOAPException
    • finallySetFaultCode

      protected void finallySetFaultCode(String faultcode) throws SOAPException
      Specified by:
      finallySetFaultCode in class FaultImpl
      Throws:
      SOAPException
    • getFaultReasonTexts

      public Iterator<String> getFaultReasonTexts() throws SOAPException
      Description copied from interface: SOAPFault
      Returns an Iterator over a sequence of String objects containing all of the Reason Text items for this SOAPFault.
      Returns:
      an Iterator over env:Fault/env:Reason/env:Text items.
      Throws:
      SOAPException - if there was an error in retrieving the fault Reason texts.
    • addFaultReasonText

      public void addFaultReasonText(String text, Locale locale) throws SOAPException
      Description copied from interface: SOAPFault
      Appends or replaces a Reason Text item containing the specified text message and an xml:lang derived from locale. If a Reason Text item with this xml:lang already exists its text value will be replaced with text. The locale parameter should not be null

      Code sample:

      
       SOAPFault fault = ...;
       fault.addFaultReasonText("Version Mismatch", Locale.ENGLISH);
       
      Parameters:
      text - -- reason message string
      locale - -- Locale object representing the locale of the message
      Throws:
      SOAPException - if there was an error in adding the Reason text or the locale passed was null.
    • getFaultReasonText

      public String getFaultReasonText(Locale locale) throws SOAPException
      Description copied from interface: SOAPFault
      Returns the Reason Text associated with the given Locale. If more than one such Reason Text exists the first matching Text is returned
      Parameters:
      locale - -- the Locale for which a localized Reason Text is desired
      Returns:
      the Reason Text associated with locale
      Throws:
      SOAPException - if there was an error in retrieving the fault Reason text for the specified locale .
      See Also:
    • getFaultReasonLocales

      public Iterator<Locale> getFaultReasonLocales() throws SOAPException
      Description copied from interface: SOAPFault
      Returns an Iterator over a distinct sequence of Locales for which there are associated Reason Text items. Any of these Locales can be used in a call to getFaultReasonText in order to obtain a localized version of the Reason Text string.
      Returns:
      an Iterator over a sequence of Locale objects for which there are associated Reason Text items.
      Throws:
      SOAPException - if there was an error in retrieving the fault Reason locales.
    • getFaultStringLocale

      public Locale getFaultStringLocale()
      Description copied from interface: SOAPFault
      Gets the locale of the fault string for this SOAPFault object.

      If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

      
          Locale locale = null;
          try {
              locale = (Locale) getFaultReasonLocales().next();
          } catch (SOAPException e) {}
          return locale;
       
      Returns:
      a Locale object indicating the native language of the fault string or null if no locale was specified
      See Also:
    • getFaultNode

      public String getFaultNode()
      Description copied from interface: SOAPFault
      Returns the optional Node element value for this SOAPFault object. The Node element is optional in SOAP 1.2.
      Returns:
      Content of the env:Fault/env:Node element as a String or null if none
    • setFaultNode

      public void setFaultNode(String uri) throws SOAPException
      Description copied from interface: SOAPFault
      Creates or replaces any existing Node element value for this SOAPFault object. The Node element is optional in SOAP 1.2.
      Parameters:
      uri - the URI of the Node
      Throws:
      SOAPException - if there was an error in setting the Node for this SOAPFault object.
    • getFaultRole

      public String getFaultRole()
      Description copied from interface: SOAPFault
      Returns the optional Role element value for this SOAPFault object. The Role element is optional in SOAP 1.2.
      Returns:
      Content of the env:Fault/env:Role element as a String or null if none
    • setFaultRole

      public void setFaultRole(String uri) throws SOAPException
      Description copied from interface: SOAPFault
      Creates or replaces any existing Role element value for this SOAPFault object. The Role element is optional in SOAP 1.2.
      Parameters:
      uri - the URI of the Role
      Throws:
      SOAPException - if there was an error in setting the Role for this SOAPFault object.
    • getFaultCode

      public String getFaultCode()
      Description copied from interface: SOAPFault
      Gets the fault code for this SOAPFault object.
      Returns:
      a String with the fault code
      See Also:
    • getFaultCodeAsQName

      public QName getFaultCodeAsQName()
      Description copied from interface: SOAPFault
      Gets the fault code for this SOAPFault object as a QName object.
      Returns:
      a QName representing the faultcode
      See Also:
    • getFaultCodeAsName

      public Name getFaultCodeAsName()
      Description copied from interface: SOAPFault
      Gets the mandatory SOAP 1.1 fault code for this SOAPFault object as a SAAJ Name object. The SOAP 1.1 specification requires the value of the "faultcode" element to be of type QName. This method returns the content of the element as a QName in the form of a SAAJ Name object. This method should be used instead of the getFaultCode method since it allows applications to easily access the namespace name without additional parsing.
      Returns:
      a Name representing the faultcode
      See Also:
    • getFaultString

      public String getFaultString()
      Description copied from interface: SOAPFault
      Gets the fault string for this SOAPFault object.

      If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

      
          String reason = null;
          try {
              reason = (String) getFaultReasonTexts().next();
          } catch (SOAPException e) {}
          return reason;
       
      Returns:
      a String giving an explanation of the fault
      See Also:
    • setFaultString

      public void setFaultString(String faultString) throws SOAPException
      Description copied from interface: SOAPFault
      Sets the fault string for this SOAPFault object to the given string.

      If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

      
            addFaultReasonText(faultString, Locale.getDefault());
       
      Parameters:
      faultString - a String giving an explanation of the fault
      Throws:
      SOAPException - if there was an error in adding the faultString to the underlying XML tree.
      See Also:
    • setFaultString

      public void setFaultString(String faultString, Locale locale) throws SOAPException
      Description copied from interface: SOAPFault
      Sets the fault string for this SOAPFault object to the given string and localized to the given locale.

      If this SOAPFault is part of a message that supports SOAP 1.2 then this call is equivalent to:

      
            addFaultReasonText(faultString, locale);
       
      Parameters:
      faultString - a String giving an explanation of the fault
      locale - a Locale object indicating the native language of the faultString
      Throws:
      SOAPException - if there was an error in adding the faultString to the underlying XML tree.
      See Also:
    • appendFaultSubcode

      public void appendFaultSubcode(QName subcode) throws SOAPException
      Description copied from interface: SOAPFault
      Adds a Subcode to the end of the sequence of Subcodes contained by this SOAPFault. Subcodes, which were introduced in SOAP 1.2, are represented by a recursive sequence of subelements rooted in the mandatory Code subelement of a SOAP Fault.
      Parameters:
      subcode - a QName containing the Value of the Subcode.
      Throws:
      SOAPException - if there was an error in setting the Subcode
    • removeAllFaultSubcodes

      public void removeAllFaultSubcodes()
      Description copied from interface: SOAPFault
      Removes any Subcodes that may be contained by this SOAPFault. Subsequent calls to getFaultSubcodes will return an empty iterator until a call to appendFaultSubcode is made.
    • getFaultSubcodes

      public Iterator<QName> getFaultSubcodes()
      Description copied from interface: SOAPFault
      Gets the Subcodes for this SOAPFault as an iterator over QNames.
      Returns:
      an Iterator that accesses a sequence of QNames. This Iterator should not support the optional remove method. The order in which the Subcodes are returned reflects the hierarchy of Subcodes present in the fault from top to bottom.
    • setEncodingStyle

      public void setEncodingStyle(String encodingStyle) throws SOAPException
      Description copied from interface: SOAPElement
      Sets the encoding style for this SOAPElement object to one specified.
      Specified by:
      setEncodingStyle in interface SOAPElement
      Overrides:
      setEncodingStyle in class ElementImpl
      Parameters:
      encodingStyle - a String giving the encoding style
      Throws:
      SOAPException - if setting the encodingStyle is invalid for this SOAPElement.
      See Also:
    • addAttribute

      public SOAPElement addAttribute(Name name, String value) throws SOAPException
      Description copied from interface: SOAPElement
      Adds an attribute with the specified name and value to this SOAPElement object.
      Specified by:
      addAttribute in interface SOAPElement
      Overrides:
      addAttribute in class ElementImpl
      Parameters:
      name - a Name object with the name of the attribute
      value - a String giving the value of the attribute
      Returns:
      the SOAPElement object into which the attribute was inserted
      Throws:
      SOAPException - if there is an error in creating the Attribute, or it is invalid to set an attribute with Name name on this SOAPElement.
      See Also:
    • addAttribute

      public SOAPElement addAttribute(QName name, String value) throws SOAPException
      Description copied from interface: SOAPElement
      Adds an attribute with the specified name and value to this SOAPElement object.
      Specified by:
      addAttribute in interface SOAPElement
      Overrides:
      addAttribute in class ElementImpl
      Parameters:
      name - a QName object with the name of the attribute
      value - a String giving the value of the attribute
      Returns:
      the SOAPElement object into which the attribute was inserted
      Throws:
      SOAPException - if there is an error in creating the Attribute, or it is invalid to set an attribute with QName qname on this SOAPElement.
      See Also:
    • addTextNode

      public SOAPElement addTextNode(String text) throws SOAPException
      Description copied from interface: SOAPElement
      Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
      Specified by:
      addTextNode in interface SOAPElement
      Overrides:
      addTextNode in class ElementImpl
      Parameters:
      text - a String object with the textual content to be added
      Returns:
      the SOAPElement object into which the new Text object was inserted
      Throws:
      SOAPException - if there is an error in creating the new Text object or if it is not legal to attach it as a child to this SOAPElement
    • addChildElement

      public SOAPElement addChildElement(SOAPElement element) throws SOAPException
      Description copied from interface: SOAPElement
      Add a SOAPElement as a child of this SOAPElement instance. The SOAPElement is expected to be created by a SOAPFactory. Callers should not rely on the element instance being added as is into the XML tree. Implementations could end up copying the content of the SOAPElement passed into an instance of a different SOAPElement implementation. For instance if addChildElement() is called on a SOAPHeader, element will be copied into an instance of a SOAPHeaderElement.

      The fragment rooted in element is either added as a whole or not at all, if there was an error.

      The fragment rooted in element cannot contain elements named "Envelope", "Header" or "Body" and in the SOAP namespace. Any namespace prefixes present in the fragment should be fully resolved using appropriate namespace declarations within the fragment itself.

      Specified by:
      addChildElement in interface SOAPElement
      Overrides:
      addChildElement in class ElementImpl
      Parameters:
      element - the SOAPElement to be added as a new child
      Returns:
      an instance representing the new SOAP element that was actually added to the tree.
      Throws:
      SOAPException - if there was an error in adding this element as a child
    • isStandardFaultElement

      protected boolean isStandardFaultElement(String localName)
      Specified by:
      isStandardFaultElement in class FaultImpl
    • getDefaultFaultCode

      protected QName getDefaultFaultCode()
      Specified by:
      getDefaultFaultCode in class FaultImpl
    • createSOAPFaultElement

      protected FaultElementImpl createSOAPFaultElement(QName qname)
      Specified by:
      createSOAPFaultElement in class FaultImpl
    • createSOAPFaultElement

      protected FaultElementImpl createSOAPFaultElement(Name qname)
      Specified by:
      createSOAPFaultElement in class FaultImpl
    • setFaultActor

      public void setFaultActor(String faultActor) throws SOAPException
      Description copied from interface: SOAPFault
      Sets this SOAPFault object with the given fault actor.

      The fault actor is the recipient in the message path who caused the fault to happen.

      If this SOAPFault supports SOAP 1.2 then this call is equivalent to SOAPFault.setFaultRole(String)

      Specified by:
      setFaultActor in interface SOAPFault
      Specified by:
      setFaultActor in class FaultImpl
      Parameters:
      faultActor - a String identifying the actor that caused this SOAPFault object
      Throws:
      SOAPException - if there was an error in adding the faultActor to the underlying XML tree.
      See Also: