Class FaultImpl

    • Method Detail

      • getDetailName

        protected abstract NameImpl getDetailName()
      • getFaultCodeName

        protected abstract NameImpl getFaultCodeName()
      • getFaultStringName

        protected abstract NameImpl getFaultStringName()
      • getFaultActorName

        protected abstract NameImpl getFaultActorName()
      • createDetail

        protected abstract DetailImpl createDetail()
      • createSOAPFaultElement

        protected abstract FaultElementImpl createSOAPFaultElement​(Name qname)
      • isStandardFaultElement

        protected abstract boolean isStandardFaultElement​(String localName)
      • getDefaultFaultCode

        protected abstract QName getDefaultFaultCode()
      • findFaultCodeElement

        protected void findFaultCodeElement()
      • findFaultActorElement

        protected void findFaultActorElement()
      • findFaultStringElement

        protected void findFaultStringElement()
      • setFaultCode

        public void setFaultCode​(Name faultCodeQName)
                          throws SOAPException
        Description copied from interface: SOAPFault
        Sets this SOAPFault object with the given fault code.

        Fault codes, which give information about the fault, are defined in the SOAP 1.1 specification. A fault code is mandatory and must be of type Name. This method provides a convenient way to set a fault code. For example,

        
         SOAPEnvelope se = ...;
         // Create a qualified name in the SOAP namespace with a localName
         // of "Client". Note that prefix parameter is optional and is null
         // here which causes the implementation to use an appropriate prefix.
         Name qname = se.createName("Client", null,
                                    SOAPConstants.URI_NS_SOAP_ENVELOPE);
         SOAPFault fault = ...;
         fault.setFaultCode(qname);
         
        It is preferable to use this method over SOAPFault.setFaultCode(String).
        Specified by:
        setFaultCode in interface SOAPFault
        Parameters:
        faultCodeQName - a Name object giving the fault code to be set. It must be namespace qualified.
        Throws:
        SOAPException - if there was an error in adding the faultcode element to the underlying XML tree.
        See Also:
        SOAPFault.getFaultCodeAsName()
      • convertCodeToQName

        protected static QName convertCodeToQName​(String code,
                                                  SOAPElement codeContainingElement)
      • initializeDetail

        protected void initializeDetail()
      • getDetail

        public Detail getDetail()
        Description copied from interface: SOAPFault
        Returns the optional detail element for this SOAPFault object.

        A Detail object carries application-specific error information, the scope of the error information is restricted to faults in the SOAPBodyElement objects if this is a SOAP 1.1 Fault.

        Specified by:
        getDetail in interface SOAPFault
        Returns:
        a Detail object with application-specific error information if present, null otherwise
      • addDetail

        public Detail addDetail()
                         throws SOAPException
        Description copied from interface: SOAPFault
        Creates an optional Detail object and sets it as the Detail object for this SOAPFault object.

        It is illegal to add a detail when the fault already contains a detail. Therefore, this method should be called only after the existing detail has been removed.

        Specified by:
        addDetail in interface SOAPFault
        Returns:
        the new Detail object
        Throws:
        SOAPException - if this SOAPFault object already contains a valid Detail object
      • hasDetail

        public boolean hasDetail()
        Description copied from interface: SOAPFault
        Returns true if this SOAPFault has a Detail subelement and false otherwise. Equivalent to (getDetail()!=null).
        Specified by:
        hasDetail in interface SOAPFault
        Returns:
        true if this SOAPFault has a Detail subelement and false otherwise.
      • setFaultActor

        public abstract 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
        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:
        SOAPFault.getFaultActor()
      • setElementQName

        public SOAPElement setElementQName​(QName newName)
                                    throws SOAPException
        Description copied from interface: SOAPElement
        Changes the name of this Element to newName if possible. SOAP Defined elements such as SOAPEnvelope, SOAPHeader, SOAPBody etc. cannot have their names changed using this method. Any attempt to do so will result in a SOAPException being thrown.

        Callers should not rely on the element instance being renamed as is. Implementations could end up copying the content of the SOAPElement to a renamed instance.

        Specified by:
        setElementQName in interface SOAPElement
        Overrides:
        setElementQName in class ElementImpl
        Parameters:
        newName - the new name for the Element.
        Returns:
        The renamed Node
        Throws:
        SOAPException - if changing the name of this Element is not allowed.
      • xmlLangToLocale

        protected static Locale xmlLangToLocale​(String xmlLang)
        Convert an xml:lang attribute value into a Locale object
        Parameters:
        xmlLang - xml:lang attribute value
        Returns:
        Locale
      • localeToXmlLang

        protected static String localeToXmlLang​(Locale locale)