Package org.apache.ws.commons.om

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


                }

                OMElement result = (OMElement) method.invoke(obj, args);
                AxisService service = msgContext.getAxisService();
                service.getTargetNamespace();
                result.declareNamespace(service.getTargetNamespace(),
                        service.getTargetNamespacePrefix());
                OMElement bodyContent;

                SOAPFactory fac = getSOAPFactory(msgContext);
                bodyContent = result;
View Full Code Here


                } else if (object == null) {
                    OMFactory omFactory = OMAbstractFactory.getOMFactory();
                    OMElement omElement = omFactory.createOMElement((QName) o, null);
                    OMNamespace omNamespace = omFactory.createOMNamespace(NIL_QNAME.getNamespaceURI(),
                            NIL_QNAME.getPrefix());
                    omElement.declareNamespace(omNamespace);
                    omElement.addAttribute(NIL_QNAME.getLocalPart(),
                            "true",
                            omNamespace);
                    childPullParser = omElement.getXMLStreamReader();
View Full Code Here

                "ns1");
        OMNamespace emptyNs = omfactory.createOMNamespace("", null);

        OMElement method = omfactory.createOMElement("doSpellingSuggestion",
                opN);
        method.declareNamespace("http://www.w3.org/1999/XMLSchema-instance",
                "xsi");
        method.declareNamespace("http://www.w3.org/1999/XMLSchema", "xsd");

        //reqEnv.getBody().addChild(method);
        method.addAttribute("soapenv:encodingStyle",
View Full Code Here

        OMElement method = omfactory.createOMElement("doSpellingSuggestion",
                opN);
        method.declareNamespace("http://www.w3.org/1999/XMLSchema-instance",
                "xsi");
        method.declareNamespace("http://www.w3.org/1999/XMLSchema", "xsd");

        //reqEnv.getBody().addChild(method);
        method.addAttribute("soapenv:encodingStyle",
                "http://schemas.xmlsoap.org/soap/encoding/",
                null);
View Full Code Here

    private OMElement getSampleDocumentElement(OMNamespace testNamespace){
        OMFactory factory = OMAbstractFactory.getOMFactory();

        OMElement documentElement = factory.createOMElement("Employees", testNamespace);
        documentElement.declareNamespace(testNamespace);

        OMElement employee;
        OMElement name;

        for (int i = 0; i < 5; i++) {
View Full Code Here

    public void testDualNamespaces2() throws Exception {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMNamespace ns1 = factory.createOMNamespace("bar", "x");
        OMElement root = factory.createOMElement("root", ns1);
        OMNamespace ns2 = root.declareNamespace("bar", "y");
        OMElement elt1 = factory.createOMElement("foo", ns1);
        OMElement elt2 = factory.createOMElement("yuck", ns2);
        OMText txt1 = factory.createText(elt2, "blah");
        elt2.addChild(txt1);
        elt1.addChild(elt2);
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.