Package org.apache.axis2.om.impl

Examples of org.apache.axis2.om.impl.OMNodeEx.serialize()


        ServiceClient sender = new ServiceClient();
        sender.setOptions(options);
        OMElement result = sender.sendReceive(getBody());

        StringWriter writer = new StringWriter();
        result.serialize(writer);
        writer.flush();

        System.out.println(writer.toString());

    }
View Full Code Here


            //Blocking invocation
            OMElement result = serviceClient.sendReceive(payload);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(writer));
            writer.flush();

            System.out.println("Response: " + writer.toString());
View Full Code Here

            sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender.setOptions(options);
            OMElement result = sender.sendReceive(payload);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(writer));
            writer.flush();
            System.out.println(writer.toString());

            //Need to close the Client Side Listener.
View Full Code Here

        OMElement result = sender.sendReceive(getPayload());

        try {
            XMLStreamWriter writer = XMLOutputFactory.newInstance()
                    .createXMLStreamWriter(System.out);
            result.serialize(writer);
            writer.flush();
        } catch (XMLStreamException e) {
            e.printStackTrace();
        } catch (FactoryConfigurationError e) {
            e.printStackTrace();
View Full Code Here

    OMText textNode = factory.createText(elem,tempText);
   
    ((Text)textNode).appendData(textToAppend);
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try {
      elem.serialize(baos);
      System.out.println(new String(baos.toByteArray()));
      //TODO TEMPORARY: remove this
    } catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
View Full Code Here

                ByteArrayInputStream(schemaTypes.getBytes()));
        OMFactory fac = OMAbstractFactory.getOMFactory();

        StAXOMBuilder staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
        OMElement schemaElement = staxOMBuilder.getDocumentElement();
        schemaElement.serialize(writer);
    }
   
    protected void writeExtensibilityAttribute(WSDLExtensibilityAttribute extAttribute) throws XMLStreamException {
        QName qname = extAttribute.getKey();
        QName value = extAttribute.getValue();
View Full Code Here

        OMNamespace namespace1 = factory.createOMNamespace("", "");
        OMElement elem1 = factory.createOMElement("", namespace1);

        StringWriter writer = new StringWriter();
        elem1.build();
        elem1.serialize(writer);
        writer.flush();
        return writer.toString();
    }

    public void testOMElemWithWhiteSpace() throws XMLStreamException {
View Full Code Here

        OMNamespace namespace1 = factory.createOMNamespace("  ", "");
        OMElement elem1 = factory.createOMElement("  ", namespace1);

        StringWriter writer = new StringWriter();
        elem1.build();
        elem1.serialize(writer);
        writer.flush();
        return writer.toString();
    }
}
View Full Code Here

            OMElement firstChild =
                (OMElement) inMessage.getEnvelope().getBody().getFirstOMChild();
            inMessage.getEnvelope().build();
            StringWriter writer = new StringWriter();
            firstChild.build();
            firstChild.serialize(writer);
            writer.flush();
            String value = writer.toString();
            if (value != null) {
                InputStream in = new ByteArrayInputStream(value.getBytes());
                GroovyClassLoader loader = new GroovyClassLoader();
View Full Code Here

            options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
            options.setProperty(Constants.Configuration.ENABLE_REST_THROUGH_GET, Constants.VALUE_TRUE);

            //if post is through GET of HTTP
            OMElement response = call.sendReceive();
            response.serialize(System.out);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
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.