Package org.apache.ws.commons.om

Examples of org.apache.ws.commons.om.OMElement.addChild()


        File dataFile = new File(fileName);
        FileDataSource dataSource = new FileDataSource(dataFile);
        expectedDH = new DataHandler(dataSource);
        OMText textData = fac.createText(expectedDH, true);
        data.addChild(textData);
        return data;
    }

    public OMElement testEchoXMLSync(String fileName) throws Exception {
View Full Code Here


        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Echo String "));
        method.addChild(value);

        return method;
    }
View Full Code Here

                        if (o instanceof OMElement) {
                            OMFactory fac = OMAbstractFactory.getOMFactory();
                            OMElement wrappingElement;
                            if (partName == null) {
                                wrappingElement = fac.createOMElement("item" + argCount, null);
                                wrappingElement.addChild((OMElement) o);
                            } else {
                                wrappingElement = fac.createOMElement(partName, null);
                                wrappingElement.addChild((OMElement) o);
                            }
                            objects.add(wrappingElement);
View Full Code Here

                            if (partName == null) {
                                wrappingElement = fac.createOMElement("item" + argCount, null);
                                wrappingElement.addChild((OMElement) o);
                            } else {
                                wrappingElement = fac.createOMElement(partName, null);
                                wrappingElement.addChild((OMElement) o);
                            }
                            objects.add(wrappingElement);
                        } else {
                            objects.add(o);
                        }
View Full Code Here

                    if (arg instanceof OMElement) {
                        OMFactory fac = OMAbstractFactory.getOMFactory();
                        OMElement wrappingElement;
                        if (partName == null) {
                            wrappingElement = fac.createOMElement("arg" + argCount, null);
                            wrappingElement.addChild((OMElement) arg);
                        } else {
                            wrappingElement = fac.createOMElement(partName, null);
                            wrappingElement.addChild((OMElement) arg);
                        }
                        objects.add(wrappingElement);
View Full Code Here

                        if (partName == null) {
                            wrappingElement = fac.createOMElement("arg" + argCount, null);
                            wrappingElement.addChild((OMElement) arg);
                        } else {
                            wrappingElement = fac.createOMElement(partName, null);
                            wrappingElement.addChild((OMElement) arg);
                        }
                        objects.add(wrappingElement);
                    } else {
                        objects.add(arg);
                    }
View Full Code Here

        OMElement element = factory.createOMElement(
                new QName("MyFirstBodyElement"), soapEnvelope.getBody());
        OMElement element11 = factory.createOMElement(
                new QName("MyFirstBodyElement"), element);
        OMText optimizedText = factory.createText("Hi", "text/plain", true);
        element11.addChild(optimizedText);
        assertTrue(
                "optmization check has not performed correctly in SOAPEnvelope",
                HTTPTransportUtils.checkEnvelopeForOptimise(soapEnvelope));
    }
View Full Code Here

        OMElement element = factory.createOMElement(
                new QName("MyFirstBodyElement"), soapEnvelope.getBody());
        OMElement element11 = factory.createOMElement(
                new QName("MyFirstBodyElement"), element);
        OMText optimizedText = factory.createText("Hi", "text/plain", false);
        element11.addChild(optimizedText);
        assertFalse(
                "optmization check has not performed correctly in SOAPEnvelope",
                HTTPTransportUtils.checkEnvelopeForOptimise(soapEnvelope));
    }
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "tcp://localhost:8080/axis2/services/MyService", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Echo String "));
        method.addChild(value);

        return method;
    }
}
View Full Code Here

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespace omNs = fac.createOMNamespace(
                "http://example1.org/example1", "example1");
        OMElement method = fac.createOMElement("echo", omNs);
        OMElement value = fac.createOMElement("Text", omNs);
        value.addChild(fac.createText(value, "Axis2 Echo String "));
        method.addChild(value);

        return method;
    }
}
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.