Java Code Examples for javax.xml.soap.SOAPFault#getFaultString()

The following examples show how to use javax.xml.soap.SOAPFault#getFaultString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SOAP12Fault.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
SOAP12Fault(SOAPFault fault) {
    code = new CodeType(fault.getFaultCodeAsQName());
    try {
        fillFaultSubCodes(fault);
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }

    reason = new ReasonType(fault.getFaultString());
    role = fault.getFaultRole();
    node = fault.getFaultNode();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 2
Source File: SoapFaultHandler.java    From freehealth-connector with GNU Affero General Public License v3.0 6 votes vote down vote up
private String getSoapFaultCode(SOAPMessage msg) throws SOAPException {
   SOAPPart part = msg.getSOAPPart();
   if (part != null) {
      SOAPEnvelope soapEnvelope = part.getEnvelope();
      if (soapEnvelope != null) {
         SOAPBody body = soapEnvelope.getBody();
         if (body != null) {
            SOAPFault fault = body.getFault();
            if (fault != null && !StringUtils.isEmpty(fault.getFaultString()) && fault.getFaultString().contains("SOA-")) {
               return fault.getFaultString();
            }
         }
      }
   }

   return null;
}
 
Example 3
Source File: SoapFaultHandler.java    From freehealth-connector with GNU Affero General Public License v3.0 6 votes vote down vote up
private String getSoapFaultCode(SOAPMessage msg) throws SOAPException{
  	SOAPPart part = msg.getSOAPPart();
if(part !=null){
	SOAPEnvelope soapEnvelope = part.getEnvelope();
	if(soapEnvelope !=null){
	SOAPBody body = soapEnvelope.getBody();
		if(body !=null){
			SOAPFault fault=body.getFault();
			if(fault !=null && !StringUtils.isEmpty(fault.getFaultString()) && fault.getFaultString().contains("SOA-")){
				return fault.getFaultString();
			}
		}
	}
}
return null;
  }
 
Example 4
Source File: SOAP12Fault.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
SOAP12Fault(SOAPFault fault) {
    code = new CodeType(fault.getFaultCodeAsQName());
    try {
        fillFaultSubCodes(fault);
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }

    reason = new ReasonType(fault.getFaultString());
    role = fault.getFaultRole();
    node = fault.getFaultNode();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 5
Source File: SOAP12Fault.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
SOAP12Fault(SOAPFault fault) {
    code = new CodeType(fault.getFaultCodeAsQName());
    try {
        fillFaultSubCodes(fault);
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }

    reason = new ReasonType(fault.getFaultString());
    role = fault.getFaultRole();
    node = fault.getFaultNode();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 6
Source File: SOAP12Fault.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
SOAP12Fault(SOAPFault fault) {
    code = new CodeType(fault.getFaultCodeAsQName());
    try {
        fillFaultSubCodes(fault);
    } catch (SOAPException e) {
        throw new WebServiceException(e);
    }

    reason = new ReasonType(fault.getFaultString());
    role = fault.getFaultRole();
    node = fault.getFaultNode();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 7
Source File: SOAP11Fault.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
SOAP11Fault(SOAPFault fault) {
    this.faultcode = fault.getFaultCodeAsQName();
    this.faultstring = fault.getFaultString();
    this.faultactor = fault.getFaultActor();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 8
Source File: SOAP11Fault.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
SOAP11Fault(SOAPFault fault) {
    this.faultcode = fault.getFaultCodeAsQName();
    this.faultstring = fault.getFaultString();
    this.faultactor = fault.getFaultActor();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 9
Source File: SOAP11Fault.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
SOAP11Fault(SOAPFault fault) {
    this.faultcode = fault.getFaultCodeAsQName();
    this.faultstring = fault.getFaultString();
    this.faultactor = fault.getFaultActor();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 10
Source File: SOAP11Fault.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
SOAP11Fault(SOAPFault fault) {
    this.faultcode = fault.getFaultCodeAsQName();
    this.faultstring = fault.getFaultString();
    this.faultactor = fault.getFaultActor();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 11
Source File: SOAP11Fault.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
SOAP11Fault(SOAPFault fault) {
    this.faultcode = fault.getFaultCodeAsQName();
    this.faultstring = fault.getFaultString();
    this.faultactor = fault.getFaultActor();
    if (fault.getDetail() != null) {
        detail = new DetailType();
        Iterator iter = fault.getDetail().getDetailEntries();
        while(iter.hasNext()){
            Element fd = (Element)iter.next();
            detail.getDetails().add(fd);
        }
    }
}
 
Example 12
Source File: SOAPFaultException.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 13
Source File: SOAPFaultException.java    From jdk1.8-source-analysis with Apache License 2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 14
Source File: SOAPFaultException.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 15
Source File: SOAPFaultException.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   {@code SOAPFault} representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 16
Source File: SOAPFaultException.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 17
Source File: SOAPFaultException.java    From JDKSourceCode1.8 with MIT License 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 18
Source File: SOAPFaultException.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 19
Source File: SOAPFaultException.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}
 
Example 20
Source File: SOAPFaultException.java    From Java8CN with Apache License 2.0 2 votes vote down vote up
/** Constructor for SOAPFaultException
 *  @param fault   <code>SOAPFault</code> representing the fault
 *
 *  @see javax.xml.soap.SOAPFactory#createFault
 **/
public SOAPFaultException(SOAPFault fault) {
    super(fault.getFaultString());
    this.fault = fault;
}