Search in sources :

Example 11 with SOAPFault

use of org.apache.axiom.soap.SOAPFault in project webservices-axiom by apache.

the class TestGetNode method runTest.

@Override
protected void runTest() throws Throwable {
    SOAPFault soapFault = soapFactory.createSOAPFault();
    assertNull("SOAP 1.2 Fault Test:- After creating a SOAP12Fault, it has a node", soapFault.getNode());
    soapFault.setNode(soapFactory.createSOAPFaultNode(soapFault));
    assertNotNull("SOAP 1.2 Fault Test:- After calling setNode method, Fault has no node", soapFault.getNode());
    assertEquals("SOAP 1.2 Fault Test:- Fault node local name mismatch", SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, soapFault.getNode().getLocalName());
}
Also used : SOAPFault(org.apache.axiom.soap.SOAPFault)

Example 12 with SOAPFault

use of org.apache.axiom.soap.SOAPFault in project webservices-axiom by apache.

the class TestGetNodeWithParser method runTest.

@Override
protected void runTest(SOAPEnvelope envelope) throws Throwable {
    SOAPFault soapFaultWithParser = envelope.getBody().getFault();
    assertNotNull("SOAP 1.2 Fault Test with parser: - getNode method returns null", soapFaultWithParser.getNode());
    assertEquals("SOAP 1.2 Fault Test with parser: - Fault node local name mismatch", SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, soapFaultWithParser.getNode().getLocalName());
}
Also used : SOAPFault(org.apache.axiom.soap.SOAPFault)

Example 13 with SOAPFault

use of org.apache.axiom.soap.SOAPFault in project webservices-axiom by apache.

the class TestGetNode method runTest.

@Override
protected void runTest() throws Throwable {
    SOAPFault soapFault = soapFactory.createSOAPFault();
    assertNull("SOAP 1.1 Fault Test:- After creating a SOAP11Fault, it has a node", soapFault.getNode());
}
Also used : SOAPFault(org.apache.axiom.soap.SOAPFault)

Example 14 with SOAPFault

use of org.apache.axiom.soap.SOAPFault in project webservices-axiom by apache.

the class TestGetValue method runTest.

@Override
protected void runTest() throws Throwable {
    SOAPEnvelope env = soapFactory.getDefaultEnvelope();
    SOAPFault fault = soapFactory.createSOAPFault(env.getBody());
    SOAPFaultCode code = soapFactory.createSOAPFaultCode(fault);
    code.setText(new QName("urn:test", "test"));
    assertNull(code.getValue());
}
Also used : SOAPFaultCode(org.apache.axiom.soap.SOAPFaultCode) QName(javax.xml.namespace.QName) SOAPFault(org.apache.axiom.soap.SOAPFault) SOAPEnvelope(org.apache.axiom.soap.SOAPEnvelope)

Example 15 with SOAPFault

use of org.apache.axiom.soap.SOAPFault in project webservices-axiom by apache.

the class TestGetRoleWithParser method runTest.

@Override
protected void runTest(SOAPEnvelope envelope) throws Throwable {
    SOAPFault soapFaultWithParser = envelope.getBody().getFault();
    assertNotNull("Fault Test with parser: - getRole method returns null", soapFaultWithParser.getRole());
    assertEquals("Fault Test with parser: - Fault role local name mismatch", spec.getFaultRoleQName(), soapFaultWithParser.getRole().getQName());
}
Also used : SOAPFault(org.apache.axiom.soap.SOAPFault)

Aggregations

SOAPFault (org.apache.axiom.soap.SOAPFault)35 SOAPEnvelope (org.apache.axiom.soap.SOAPEnvelope)13 OMElement (org.apache.axiom.om.OMElement)12 SOAPFaultReason (org.apache.axiom.soap.SOAPFaultReason)10 SOAPFaultDetail (org.apache.axiom.soap.SOAPFaultDetail)9 SOAPFaultCode (org.apache.axiom.soap.SOAPFaultCode)8 SOAPBody (org.apache.axiom.soap.SOAPBody)7 QName (javax.xml.namespace.QName)6 SOAPProcessingException (org.apache.axiom.soap.SOAPProcessingException)4 StringReader (java.io.StringReader)3 OMNamespace (org.apache.axiom.om.OMNamespace)3 OMNode (org.apache.axiom.om.OMNode)3 SOAPFaultRole (org.apache.axiom.soap.SOAPFaultRole)3 SOAPFaultSubCode (org.apache.axiom.soap.SOAPFaultSubCode)3 SOAPFaultValue (org.apache.axiom.soap.SOAPFaultValue)3 SOAPHeader (org.apache.axiom.soap.SOAPHeader)3 SOAPHeaderBlock (org.apache.axiom.soap.SOAPHeaderBlock)3 OMAttribute (org.apache.axiom.om.OMAttribute)2 OMXMLParserWrapper (org.apache.axiom.om.OMXMLParserWrapper)2 SOAPFaultNode (org.apache.axiom.soap.SOAPFaultNode)2