Class Fault1_2Impl

    • Method Detail

      • 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:
        SOAPFault.getFaultString()
      • 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:
        SOAPFault.setFaultString(String, Locale)
      • 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.
      • 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:
        SOAPFault.setFaultCode(QName)
      • 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:
        SOAPFault.setFaultCode(Name)
      • 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:
        SOAPFault.setFaultString(String), SOAPFault.setFaultString(String, Locale)
      • 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:
        SOAPFault.getFaultString()
      • 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:
        SOAPFault.getFaultString()
      • 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.
      • 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