Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPFactory.createSOAPEnvelope()


        } else if (soapNamespaceURI.equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
            soapFactory = OMAbstractFactory.getSOAP12Factory();
        } else {
            log.error("Not a standard soap message");
        }
        SOAPEnvelope newEnv = soapFactory.createSOAPEnvelope();
        soapFactory.createSOAPHeader(newEnv);
        soapFactory.createSOAPBody(newEnv);

        MessageContext eventMessageContext = new MessageContext();
View Full Code Here


                        soapFactory = OMAbstractFactory.getSOAP12Factory();
                    } else {
                        log.error("Not a standard soap message");
                    }

                    SOAPEnvelope newEnv = soapFactory.createSOAPEnvelope();
                    soapFactory.createSOAPHeader(newEnv);
                    soapFactory.createSOAPBody(newEnv);

                    MessageContext eventMessageContext = new MessageContext();
View Full Code Here

                MessageContext outMsgContext = Utils.createOutMessageContext(messageCtx);
                outMsgContext.getOperationContext().addMessageContext(outMsgContext);

                // Far too many lines of code...
                SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
                SOAPEnvelope env = factory.createSOAPEnvelope();
                SOAPHeader header = factory.createSOAPHeader(env);
                SOAPBody body = factory.createSOAPBody(env);
                outMsgContext.setEnvelope(env);
                OMElement respElmt = factory.createOMElement(new QName("http://axis2.ode.apache.org", "faultTestResponse"));
                body.addChild(respElmt);
View Full Code Here

public abstract class CommandBuilderTestUtils {

    public static MessageContext getMCWithSOAP11Envelope() throws AxisFault {
        MessageContext messageContext = new MessageContext();
        SOAPFactory factory = new SOAP11Factory();
        SOAPEnvelope envelope = factory.createSOAPEnvelope();
        messageContext.setEnvelope(envelope);
        return messageContext;
    }

    public static MessageContext getMCWithSOAP12Envelope() throws AxisFault {
View Full Code Here

    }

    public static MessageContext getMCWithSOAP12Envelope() throws AxisFault {
        MessageContext messageContext = new MessageContext();
        SOAPFactory factory = new SOAP12Factory();
        SOAPEnvelope envelope = factory.createSOAPEnvelope();
        messageContext.setEnvelope(envelope);
        return messageContext;
    }

    public static SOAPEnvelope payloadToSOAP11Envelope(String payload) throws XMLStreamException {
View Full Code Here

public abstract class CommandBuilderTestUtils {

    public static MessageContext getMCWithSOAP11Envelope() throws AxisFault {
        MessageContext messageContext = new MessageContext();
        SOAPFactory factory = new SOAP11Factory();
        SOAPEnvelope envelope = factory.createSOAPEnvelope();
        messageContext.setEnvelope(envelope);
        return messageContext;
    }

    public static MessageContext getMCWithSOAP12Envelope() throws AxisFault {
View Full Code Here

    }

    public static MessageContext getMCWithSOAP12Envelope() throws AxisFault {
        MessageContext messageContext = new MessageContext();
        SOAPFactory factory = new SOAP12Factory();
        SOAPEnvelope envelope = factory.createSOAPEnvelope();
        messageContext.setEnvelope(envelope);
        return messageContext;
    }

    public static SOAPEnvelope payloadToSOAP11Envelope(String payload) throws XMLStreamException {
View Full Code Here

    // This test fails because of a bug in axis2 there fore its coded so that the test passes when
    // an exception is thrown
    public void testMessageBuilingFromByteArray() throws Exception {

        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        SOAPEnvelope env = fac.createSOAPEnvelope();
        fac.createSOAPBody(env);
        env.getBody().addChild(fac.createOMElement("test", "http://t", "t"));
        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
        try {
            env.serialize(outStream);
View Full Code Here

            StAXOMBuilder resultsBuilder = new StAXOMBuilder(reader);
            OMElement resultSer = resultsBuilder.getDocumentElement();

            // create the response soap
            SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope resEnv = factory.createSOAPEnvelope();
            SOAPBody resBody = factory.createSOAPBody();
            OMElement resService = factory.createOMElement(new QName(serviceName + "Response"));
            resService.addChild(resultSer.getFirstElement());
            resBody.addChild(resService);
            resEnv.addChild(resBody);
View Full Code Here

            StAXOMBuilder resultsBuilder = new StAXOMBuilder(xmlReader);
            OMElement resultSer = resultsBuilder.getDocumentElement();

            // create the response soap
            SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope resEnv = factory.createSOAPEnvelope();
            SOAPBody resBody = factory.createSOAPBody();
            OMElement errMsg = factory.createOMElement(new QName("Response"));
            errMsg.addChild(resultSer.getFirstElement());
            resBody.addChild(errMsg);
            resEnv.addChild(resBody);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.