Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFaultSubCode


      if (faultCode.getTextAsQName().getNamespaceURI().equals(WSConstants.WSSE_NS)) {
        return true;
      }
    } else if (soapVersionURI.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
      // TODO AXIOM API returns only one fault sub code, there can be many
      SOAPFaultSubCode faultSubCode = faultCode.getSubCode();
      if (faultSubCode != null) {
        SOAPFaultValue faultSubCodeValue = faultSubCode.getValue();

        // This is a fault processing the security header
        if (faultSubCodeValue != null && faultSubCodeValue.getTextAsQName().
            getNamespaceURI().equals(WSConstants.WSSE_NS)) {
          return true;
View Full Code Here


    SOAPFaultCode faultCode = fault.getCode();
    SOAPFaultValue codeValue = faultCode.getValue();
    codeValue.setText(data.getCode());

    SOAPFaultSubCode faultSubCode = factory
        .createSOAPFaultSubCode(faultCode);
    SOAPFaultValue subCodeValue = factory
        .createSOAPFaultValue(faultSubCode);
    subCodeValue.setText(data.getSubcode());
View Full Code Here

    SOAPFaultCode faultCode = fault.getCode();
    SOAPFaultValue codeValue = faultCode.getValue();
    codeValue.setText(data.getCode());

    SOAPFaultSubCode faultSubCode = factory
        .createSOAPFaultSubCode(faultCode);
    SOAPFaultValue subCodeValue = factory
        .createSOAPFaultValue(faultSubCode);
    subCodeValue.setText(data.getSubcode());
View Full Code Here

                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
            assertTrue("SOAP 1.2 :- Value1 text mismatch",
                    value1.getText().equals("env:Sender"));

            iteratorInCode.next();
            SOAPFaultSubCode subCode1 = (SOAPFaultSubCode) iteratorInCode.next();
            assertTrue("SOAP 1.2 :- Fault sub code local name mismatch",
                    subCode1.getLocalName().equals(
                            SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
            assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch",
                    subCode1.getNamespace().getNamespaceURI().equals(
                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));

            Iterator iteratorInSubCode1 = subCode1.getChildren();

            iteratorInSubCode1.next();
            SOAPFaultValue value2 = (SOAPFaultValue) iteratorInSubCode1.next();
            assertTrue("SOAP 1.2 :- Fault code value local name mismatch",
                    value2.getLocalName().equals(
                            SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME));
            assertTrue("SOAP 1.2 :- Fault code namespace uri mismatch",
                    value2.getNamespace().getNamespaceURI().equals(
                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
            assertTrue("SOAP 1.2 :- Value2 text mismatch",
                    value2.getText().equals("m:MessageTimeout"));

            iteratorInSubCode1.next();
            SOAPFaultSubCode subCode2 = (SOAPFaultSubCode) iteratorInSubCode1.next();
            assertTrue("SOAP 1.2 :- Fault sub code local name mismatch",
                    subCode2.getLocalName().equals(
                            SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
            assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch",
                    subCode2.getNamespace().getNamespaceURI().equals(
                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));

            Iterator iteratorInSubCode2 = subCode2.getChildren();

            iteratorInSubCode2.next();
            SOAPFaultValue value3 = (SOAPFaultValue) iteratorInSubCode2.next();
            assertTrue("SOAP 1.2 :- Fault code value local name mismatch",
                    value3.getLocalName().equals(
View Full Code Here

                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
            assertTrue("SOAP 1.2 :- Value1 text mismatch",
                    value1.getText().equals("env:Sender"));

            iteratorInCode.next();
            SOAPFaultSubCode subCode1 = (SOAPFaultSubCode) iteratorInCode.next();
            assertTrue("SOAP 1.2 :- Fault sub code local name mismatch",
                    subCode1.getLocalName().equals(
                            SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
            assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch",
                    subCode1.getNamespace().getName().equals(
                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));

            Iterator iteratorInSubCode1 = subCode1.getChildren();

            iteratorInSubCode1.next();
            SOAPFaultValue value2 = (SOAPFaultValue) iteratorInSubCode1.next();
            assertTrue("SOAP 1.2 :- Fault code value local name mismatch",
                    value2.getLocalName().equals(
                            SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME));
            assertTrue("SOAP 1.2 :- Fault code namespace uri mismatch",
                    value2.getNamespace().getName().equals(
                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
            assertTrue("SOAP 1.2 :- Value2 text mismatch",
                    value2.getText().equals("m:MessageTimeout"));

            iteratorInSubCode1.next();
            SOAPFaultSubCode subCode2 = (SOAPFaultSubCode) iteratorInSubCode1.next();
            assertTrue("SOAP 1.2 :- Fault sub code local name mismatch",
                    subCode2.getLocalName().equals(
                            SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
            assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch",
                    subCode2.getNamespace().getName().equals(
                            SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));

            Iterator iteratorInSubCode2 = subCode2.getChildren();

            iteratorInSubCode2.next();
            SOAPFaultValue value3 = (SOAPFaultValue) iteratorInSubCode2.next();
            assertTrue("SOAP 1.2 :- Fault code value local name mismatch",
                    value3.getLocalName().equals(
View Full Code Here

                   valueQName.getNamespaceURI().equals(
                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));


        iteratorInCode.next();
        SOAPFaultSubCode subCode1 = (SOAPFaultSubCode) iteratorInCode.next();
        assertTrue("SOAP 1.2 :- Fault sub code local name mismatch",
                   subCode1.getLocalName().equals(
                           SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
        assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch",
                   subCode1.getNamespace().getNamespaceURI().equals(
                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));

        Iterator iteratorInSubCode1 = subCode1.getChildren();

        iteratorInSubCode1.next();
        SOAPFaultValue value2 = (SOAPFaultValue) iteratorInSubCode1.next();
        assertTrue("SOAP 1.2 :- Fault code value local name mismatch",
                   value2.getLocalName().equals(
                           SOAP12Constants.SOAP_FAULT_VALUE_LOCAL_NAME));
        assertTrue("SOAP 1.2 :- Fault code namespace uri mismatch",
                   value2.getNamespace().getNamespaceURI().equals(
                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
        assertTrue("SOAP 1.2 :- Value2 text mismatch",
                   value2.getText().equals("m:MessageTimeout"));

        iteratorInSubCode1.next();
        SOAPFaultSubCode subCode2 = (SOAPFaultSubCode) iteratorInSubCode1.next();
        assertTrue("SOAP 1.2 :- Fault sub code local name mismatch",
                   subCode2.getLocalName().equals(
                           SOAP12Constants.SOAP_FAULT_SUB_CODE_LOCAL_NAME));
        assertTrue("SOAP 1.2 :- Fault subcode namespace uri mismatch",
                   subCode2.getNamespace().getNamespaceURI().equals(
                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));

        Iterator iteratorInSubCode2 = subCode2.getChildren();

        iteratorInSubCode2.next();
        SOAPFaultValue value3 = (SOAPFaultValue) iteratorInSubCode2.next();
        assertTrue("SOAP 1.2 :- Fault code value local name mismatch",
                   value3.getLocalName().equals(
View Full Code Here

            if (faultCode.getTextAsQName().getNamespaceURI().equals(WSConstants.WSSE_NS)) {
                return true;
            }
        } else if (soapVersionURI.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
            // TODO AXIOM API returns only one fault sub code, there can be many
            SOAPFaultSubCode faultSubCode = faultCode.getSubCode();
            if (faultSubCode != null) {
                SOAPFaultValue faultSubCodeValue = faultSubCode.getValue();

                // This is a fault processing the security header
                if (faultSubCodeValue != null
                        && faultSubCodeValue.getTextAsQName().getNamespaceURI()
                                .equals(WSConstants.WSSE_NS)) {
View Full Code Here

            message.getBody().getFault().setReason(soapFaultReason);
            SOAPFaultCode soapFaultCode = soapFactory.createSOAPFaultCode();
            SOAPFaultValue soapFaultValue = soapFactory.createSOAPFaultValue(soapFaultCode);
            soapFaultValue.setText(code);
            soapFaultCode.setValue(soapFaultValue);
            SOAPFaultSubCode soapFaultSubCode = soapFactory.createSOAPFaultSubCode(soapFaultCode);
            SOAPFaultValue soapFaultValueSub = soapFactory.createSOAPFaultValue(soapFaultSubCode);
            QName qNameSubCode = new QName(CommandBuilderConstants.WSE_EVENTING_NS, subCode,
                    CommandBuilderConstants.WSE_EVENTING_PREFIX);
            soapFaultValueSub.setText(qNameSubCode);
            soapFaultSubCode.setValue(soapFaultValueSub);
            soapFaultCode.setSubCode(soapFaultSubCode);
            message.getBody().getFault().setCode(soapFaultCode);
            return message;
        }
    }
View Full Code Here

            message.getBody().getFault().setReason(soapFaultReason);
            SOAPFaultCode soapFaultCode = soapFactory.createSOAPFaultCode();
            SOAPFaultValue soapFaultValue = soapFactory.createSOAPFaultValue(soapFaultCode);
            soapFaultValue.setText(code);
            soapFaultCode.setValue(soapFaultValue);
            SOAPFaultSubCode soapFaultSubCode = soapFactory.createSOAPFaultSubCode(soapFaultCode);
            SOAPFaultValue soapFaultValueSub = soapFactory.createSOAPFaultValue(soapFaultSubCode);
            QName qNameSubCode = new QName(EventingConstants.WSE_EVENTING_NS, subCode,
                    EventingConstants.WSE_EVENTING_PREFIX);
            soapFaultValueSub.setText(qNameSubCode);
            soapFaultSubCode.setValue(soapFaultValueSub);
            soapFaultCode.setSubCode(soapFaultSubCode);
            message.getBody().getFault().setCode(soapFaultCode);
            return message;
        }
    }
View Full Code Here

        SOAPFaultValue soapFaultValue = factory.createSOAPFaultValue(soapFaultCode);

        soapFaultValue.setText(faultCode.getPrefix() + ":"
                               + faultCode.getLocalPart());

        SOAPFaultSubCode soapFaultSubCode = factory
                .createSOAPFaultSubCode(soapFaultCode);
        SOAPFaultValue soapFaultSubCodeValue = factory
                .createSOAPFaultValue(soapFaultSubCode);

        soapFaultSubCodeValue.setText(faultSubcode.getPrefix() + ":"
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.SOAPFaultSubCode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.