Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPEnvelope.addChild()


   
    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);
        payload.getBuilder().setCache(false); // Or This line will cause NoSuchElementException
View Full Code Here


    protected void runTest() throws Throwable {
        SOAPFactory soapFactory = metaFactory.getSOAP12Factory();
        SOAPEnvelope env = soapFactory.getDefaultEnvelope();
        try {
            env.addChild(soapFactory.createOMElement("test", "urn:test", "p"));
            fail("Expected SOAPProcessingException");
        } catch (SOAPProcessingException ex) {
            // Expected
        }
    }
View Full Code Here

    }

    protected void runTest() throws Throwable {
        SOAPFactory soapFactory = metaFactory.getSOAP11Factory();
        SOAPEnvelope env = soapFactory.getDefaultEnvelope();
        env.addChild(soapFactory.createOMElement("test", "urn:test", "p"));
    }
}
View Full Code Here

                createOMNamespace("http://www.w3.org/2005/08/addressing", "wsa");

        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();

        SOAPHeader header = soapFactory.createSOAPHeader();
        envelope.addChild(header);

        OMNamespace synNamespace = soapFactory.
                createOMNamespace("http://ws.apache.org/namespaces/synapse", "syn");
        OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
        clientIDElement.setText(clientID);
View Full Code Here

        OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
        clientIDElement.setText(clientID);
        header.addChild(clientIDElement);

        SOAPBody body = soapFactory.createSOAPBody();
        envelope.addChild(body);

        OMElement valueElement = soapFactory.createOMElement("Value", null);
        valueElement.setText(value);
        body.addChild(valueElement);
View Full Code Here

            createOMNamespace("http://www.w3.org/2005/08/addressing", "wsa");

        SOAPEnvelope envelope = soapFactory.createSOAPEnvelope();

        SOAPHeader header = soapFactory.createSOAPHeader();
        envelope.addChild(header);

        OMNamespace synNamespace = soapFactory.
            createOMNamespace("http://ws.apache.org/ns/synapse", "syn");
        OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
        clientIDElement.setText(clientID);
View Full Code Here

        OMElement clientIDElement = soapFactory.createOMElement("ClientID", synNamespace);
        clientIDElement.setText(clientID);
        header.addChild(clientIDElement);

        SOAPBody body = soapFactory.createSOAPBody();
        envelope.addChild(body);

        OMElement valueElement = soapFactory.createOMElement("Value", null);
        valueElement.setText(value);
        body.addChild(valueElement);
View Full Code Here

        OMElement data1 = omFac.createOMElement(new QName("part"));
        data1.setText("sample data");

        content.addChild(data1);
        sopaBody.addChild(content);
        enp.addChild(sopaBody);
        return enp;
    }
}
View Full Code Here

        data2.setText("sample data part 2");

        content.addChild(data1);
        content.addChild(data2);
        sopaBody.addChild(content);
        enp.addChild(sopaBody);
        return enp;
    }

    public void testGetBytes() throws AxisFault {
View Full Code Here

        OMElement data1 = omFac.createOMElement(new QName("part"));
        data1.setText("sample data");

        content.addChild(data1);
        sopaBody.addChild(content);
        enp.addChild(sopaBody);
        return enp;
    }

}
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.