Package org.apache.axiom.om

Examples of org.apache.axiom.om.OMElement.addChild()


                OMElement parms = fac.createOMElement(DEFAULT_QUEUE_CONNECTION_FACTORY, null);                   

                for ( String key : jmsProps.keySet() ) {
                    OMElement param = fac.createOMElement("parameter", null);
                    param.addAttribute( "name", key, null );
                    param.addChild(fac.createOMText(param, jmsProps.get(key)));
                    parms.addChild(param);
                }
               
                Parameter queueConnectionFactory = new Parameter(DEFAULT_QUEUE_CONNECTION_FACTORY, parms);
                trsIn.addParameter( queueConnectionFactory );
View Full Code Here


        Map<String, Object> results = null;
        try {
            OMFactory factory = OMAbstractFactory.getOMFactory();
            OMElement payload = factory.createOMElement(serviceName);
            payload.addChild(parameterSer.getFirstElement());
            OMElement respOMElement = client.sendReceive(payload);
            client.cleanupTransport();
            results = UtilGenerics.cast(SoapSerializer.deserialize(respOMElement.toString(), delegator));
        } catch (Exception e) {
            Debug.logError(e, module);
View Full Code Here

            // 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);

            // The declareDefaultNamespace method doesn't work see (https://issues.apache.org/jira/browse/AXIS2-3156)
            // so the following doesn't work:
View Full Code Here

            // create the response soap
            SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
            SOAPEnvelope resEnv = factory.createSOAPEnvelope();
            SOAPBody resBody = factory.createSOAPBody();
            OMElement errMsg = factory.createOMElement(new QName((serviceName != null ? serviceName : "") + "Response"));
            errMsg.addChild(resultSer.getFirstElement());
            resBody.addChild(errMsg);
            resEnv.addChild(resBody);

            // The declareDefaultNamespace method doesn't work see (https://issues.apache.org/jira/browse/AXIS2-3156)
            // so the following doesn't work:
View Full Code Here

        StAXOMBuilder staxOMBuilders = new StAXOMBuilder(fac, xmlReader);
        Iterator iterator = staxOMBuilders.getDocumentElement()
                .getChildElements();
        while (iterator.hasNext()) {
            wsdlTypes.addChild((OMNode) iterator.next());
        }
        defintions.addChild(wsdlTypes);
    }

    private void writeSchemas(StringWriter writer) {
View Full Code Here

                null);
        //adding message refs
        for (int i = 0; i < method.length; i++) {
            jmethod = method[i];
            operation = fac.createOMElement(OPERATION_LOCAL_NAME, wsdl);
            portType.addChild(operation);
            operation.addAttribute(ATTRIBUTE_NAME, jmethod.getSimpleName(),
                    null);

            message = fac.createOMElement(IN_PUT_LOCAL_NAME, wsdl);
            message.addAttribute(MESSAGE_LOCAL_NAME, tns.getPrefix()
View Full Code Here

        // Trigger expansion of the child OMSE
        // This will cause the child to be partially parsed (i.e. incomplete)
        child.getChildren();
       
        // Add the child OMSE to the root.
        root.addChild(child);
       
        // Normally adding an incomplete child to a parent will
        // cause the parent to be marked as incomplete.
        // But OMSE's are self-contained...therefore the root
        // should still be complete
View Full Code Here

        // Now repeat the test, but this time trigger the
        // partial parsing of the child after adding it to the root.
        child = new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument));
        root = f.createOMElement("root", rootNS);
       
        root.addChild(child);
        child.getChildren(); // causes partial parsing...i.e. incomplete child
   
        assertTrue(!child.isComplete());
        assertTrue(root.isComplete());
    }
View Full Code Here

        OMNamespace ns =
                new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", "DUMMYPREFIX");
        OMElement element =
                new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument));
        OMElement root = f.createOMElement("root", rootNS);
        root.addChild(element);

        // Test getting the namespace, localpart and prefix.  This should used not result in expansion
        assertTrue(element.getLocalName().equals("library"));
        assertTrue(element.getNamespace().getNamespaceURI().equals(
                "http://www.sosnoski.com/uwjws/library"));
View Full Code Here

        OMNamespace ns =
                new OMNamespaceImpl("http://www.sosnoski.com/uwjws/library", "DUMMYPREFIX");
        OMElement element =
                new OMSourcedElementImpl("library", ns, f, new TestDataSource(testDocument));
        OMElement root = f.createOMElement("root", rootNS);
        root.addChild(element);

        // Test getting the namespace, localpart and prefix.  This should used not result in expansion
        assertTrue(element.getLocalName().equals("library"));
        assertTrue(element.getNamespace().getNamespaceURI().equals(
                "http://www.sosnoski.com/uwjws/library"));
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.