Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFaultNode


            }
        }

        Object faultNode = context.getProperty(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME);
        if (faultNode != null) {
            SOAPFaultNode soapFaultNode = fault.getNode();
            if(soapFaultNode != null) {
                soapFaultNode.setText((String) faultNode);
            }
        } else if (axisFault != null) {
            if (axisFault.getFaultNodeElement() != null) {
                fault.setNode(axisFault.getFaultNodeElement());
            }
View Full Code Here


    }

    protected void serializeFaultNode(
            XMLStreamWriter writer)
            throws XMLStreamException {
        SOAPFaultNode faultNode = getNode();
        if (faultNode != null && faultNode.getText() != null
                && !"".equals(faultNode.getText())) {
            ((SOAP12FaultNodeImpl) faultNode).internalSerialize(writer, true);
        }
    }
View Full Code Here

                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
        assertTrue("SOAP 1.2 :- Text value mismatch",
                   text.getText().equals("Sender Timeout"));

        iteratorInFault.next();
        SOAPFaultNode node = (SOAPFaultNode) iteratorInFault.next();
        assertTrue("SOAP 1.2 :- Fault node local name mismatch",
                   node.getLocalName().equals(
                           SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
        assertTrue("SOAP 1.2 :- Fault node namespace uri mismatch",
                   node.getNamespace().getNamespaceURI().equals(
                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
        assertTrue("SOAP 1.2 :- Node value mismatch",
                   node.getText().trim().equals(
                           "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));

        iteratorInFault.next();
        SOAPFaultRole role = (SOAPFaultRole) iteratorInFault.next();
        assertTrue("SOAP 1.2 :- Fault role local name mismatch",
View Full Code Here

     * @param sourceNode
     */
    private static void copySOAPFaultNode(SOAPFactory factory,
                                          SOAPFault targetFault,
                                          SOAPFaultNode sourceNode) {
        SOAPFaultNode targetNode = factory.createSOAPFaultNode(targetFault);
        copyTagData(sourceNode, targetNode);
        targetNode.setNodeValue(sourceNode.getNodeValue());
    }
View Full Code Here

                    "Expecting SOAP 1.2 implementation of SOAP Body as the parent. But received some other implementation");
        }
    }

    protected void serializeFaultNode(XMLStreamWriter writer) throws XMLStreamException {
        SOAPFaultNode faultNode = getNode();
        if (faultNode != null) {
            (faultNode).serialize(writer);
        }
    }
View Full Code Here

                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
        assertTrue("SOAP 1.2 :- Text value mismatch",
                   text.getText().equals("Sender Timeout"));

        iteratorInFault.next();
        SOAPFaultNode node = (SOAPFaultNode) iteratorInFault.next();
        assertTrue("SOAP 1.2 :- Fault node local name mismatch",
                   node.getLocalName().equals(
                           SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME));
        assertTrue("SOAP 1.2 :- Fault node namespace uri mismatch",
                   node.getNamespace().getNamespaceURI().equals(
                           SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI));
        assertTrue("SOAP 1.2 :- Node value mismatch",
                   node.getText().trim().equals(
                           "http://www.w3.org/2003/05/soap-envelope/role/ultimateReceiver"));

        iteratorInFault.next();
        SOAPFaultRole role = (SOAPFaultRole) iteratorInFault.next();
        assertTrue("SOAP 1.2 :- Fault role local name mismatch",
View Full Code Here

    }

    protected void serializeFaultNode(
            XMLStreamWriter writer)
            throws XMLStreamException {
        SOAPFaultNode faultNode = getNode();
        if (faultNode != null && faultNode.getText() != null
                && !"".equals(faultNode.getText())) {
            faultNode.serialize(writer);
        }
    }
View Full Code Here

                                    text.setLang("en-US");
                                    text.setText("Header not understood");
                                    reason.addSOAPText(text);
                                    //fault.setReason(reason);
                                    if (roleValue != null && roleValue.equals(SAMPLE_ROLE + "/" + ROLE_BY_B)) {
                                        SOAPFaultNode node = factory.createSOAPFaultNode(fault);
                                        node.setNodeValue(SAMPLE_ROLE + "/" + ROLE_BY_B);
                                        SOAPFaultRole role = factory.createSOAPFaultRole(fault);
                                        role.setRoleValue(SAMPLE_ROLE + "/" + ROLE_BY_B);
                                        msgContext.setProperty(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, node);
                                        msgContext.setProperty(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, role);
                                    }
View Full Code Here

                                    text.setLang("en-US");
                                    text.setText("Header not understood");
                                    reason.addSOAPText(text);
                                    //fault.setReason(reason);
                                    if (roleValue != null && roleValue.equals(SAMPLE_ROLE + "/" + ROLE_BY_B)) {
                                        SOAPFaultNode node = factory.createSOAPFaultNode(fault);
                                        node.setNodeValue(SAMPLE_ROLE + "/" + ROLE_BY_B);
                                        SOAPFaultRole role = factory.createSOAPFaultRole(fault);
                                        role.setRoleValue(SAMPLE_ROLE + "/" + ROLE_BY_B);
                                        msgContext.setProperty(SOAP12Constants.SOAP_FAULT_NODE_LOCAL_NAME, node);
                                        msgContext.setProperty(SOAP12Constants.SOAP_FAULT_ROLE_LOCAL_NAME, role);
                                    }
View Full Code Here

            throw new UnsupportedOperationException("message does not support " +
                    "the SOAP 1.2 concept of Fault Node");
        } else if (this.element.getOMFactory() instanceof SOAP12Factory) {
            soapFactory = DOOMAbstractFactory.getSOAP12Factory();
        }
        SOAPFaultNode soapFaultNode = soapFactory.createSOAPFaultNode(this.fault);
        soapFaultNode.setText(s);
        this.fault.setNode(soapFaultNode);
    }
View Full Code Here

TOP

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

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.