Package org.apache.axiom.soap

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


            throw e;
        }

        SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
        sf.createSOAPBody(responseEnv);
        responseEnv.getBody().addChild(outputElement);
        MessageContext outMessageContext = MessageContextBuilder.createOutMessageContext(messageContext);
        outMessageContext.setEnvelope(responseEnv);
        AxisEngine.send(outMessageContext);
        return outputElement;
View Full Code Here


            // create Concrete WSDL
            String cWSDL = WSDLUtil.createCWSDL(wsdlElement.toString(), serviceEpr);

            SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
            sf.createSOAPBody(responseEnv);

            XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(
                    new StringReader(cWSDL.toString()));
            StAXOMBuilder builder = new StAXOMBuilder(reader);
            responseEnv.getBody().addChild(builder.getDocumentElement());
View Full Code Here

        // into repository
        try {
            OMElement wsdlElement = getWSDL(context, serviceName);
            SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
            sf.createSOAPBody(responseEnv);
            responseEnv.getBody().addChild(wsdlElement);
            response = MessageContextBuilder.createOutMessageContext(messageContext);
            response.setEnvelope(responseEnv);
            response.getOperationContext().addMessageContext(response);
            AxisEngine.send(response);
View Full Code Here

        OMElement child = (OMElement) itr.next();

        // Create the envelope for the response
        SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
        sf.createSOAPBody(responseEnv);
        OMElement responseBodyContent = null;
       
        // Check to see which operation was invoked and then validate the contents
        // of the request (resolved AxisOperation and the soap action) to see if they are correct.
        String name = child.getLocalName();
View Full Code Here

       
        OMElement payload = createPayload();
       
        SOAPFactory factory = new SOAP11Factory();
        SOAPEnvelope env = factory.createSOAPEnvelope();
        SOAPBody body = factory.createSOAPBody(env);
       
        body.addChild(payload);
       
        OMOutputFormat format = new OMOutputFormat();
        format.setDoOptimize(true);
View Full Code Here

                    OMNode child = (OMNode) j.next();
                    copy(factory, targetHeader, child);
                }
            } else if (node instanceof SOAPBody) {
                // Copy the SOAPBody tree
                SOAPBody targetBody = factory.createSOAPBody(targetEnv);
                Iterator j = ((SOAPBody)node).getChildren();
                while (j.hasNext()) {
                    OMNode child = (OMNode) j.next();
                    copy(factory, targetBody, child);
                }
View Full Code Here

public class SourcedOMElementTest extends TestCase {
   
    public void testSerialization() throws Exception {
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope envelope = factory.createSOAPEnvelope();
        SOAPBody body = factory.createSOAPBody();
        envelope.addChild(body);
        OMNamespace ns = factory.createOMNamespace("http://ns1", "d");
        OMElement payload = factory.createOMElement(new DummySource(), "dummy", ns);
        payload.setNamespace(ns); // This line will cause NoSuchElementException
        body.addChild(payload);
View Full Code Here

            throw e;
        }

        SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
        sf.createSOAPBody(responseEnv);
        responseEnv.getBody().addChild(outputElement);
        MessageContext outMessageContext = MessageContextBuilder.createOutMessageContext(messageContext);
        outMessageContext.setEnvelope(responseEnv);
        AxisEngine.send(outMessageContext);
        return outputElement;
View Full Code Here

            // create Concrete WSDL
            String cWSDL = WSDLUtil.createCWSDL(wsdlElement.toString(), serviceEpr);

            SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
            sf.createSOAPBody(responseEnv);

            XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(
                    new StringReader(cWSDL.toString()));
            StAXOMBuilder builder = new StAXOMBuilder(reader);
            responseEnv.getBody().addChild(builder.getDocumentElement());
View Full Code Here

        // into repository
        try {
            OMElement wsdlElement = getWSDL(context, serviceName);
            SOAPFactory sf = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope responseEnv = sf.createSOAPEnvelope();
            sf.createSOAPBody(responseEnv);
            responseEnv.getBody().addChild(wsdlElement);
            response = MessageContextBuilder.createOutMessageContext(messageContext);
            response.setEnvelope(responseEnv);
            response.getOperationContext().addMessageContext(response);
            AxisEngine.send(response);
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.