Examples of OMElementImpl


Examples of org.apache.axiom.om.impl.llom.OMElementImpl

     * @return Returns OMElement.
     */
    public OMElement createOMElement(String localName, OMNamespace ns,
                                     OMContainer parent,
                                     OMXMLParserWrapper builder) {
        return new OMElementImpl(localName, ns, parent,
                                 builder, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

     * @return Returns the new OMElement
     * @throws OMException if there's a namespace mapping problem
     */
    public OMElement createOMElement(QName qname, OMContainer parent)
            throws OMException {
        return new OMElementImpl(qname, parent, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

     *
     * @param qname
     * @return the new OMElement.
     */
    public OMElement createOMElement(QName qname) throws OMException {
        return new OMElementImpl(qname, null, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

        baseOutputFormat.setDoOptimize(false);

        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMNamespaceImpl soap = new OMNamespaceImpl(
                "http://schemas.xmlsoap.org/soap/envelope/", "soap");
        OMElement envelope = new OMElementImpl("Envelope", soap, fac);
        OMElement body = new OMElementImpl("Body", soap, fac);

        OMNamespaceImpl dataName = new OMNamespaceImpl(
                "http://www.example.org/stuff", "m");
        OMElement data = new OMElementImpl("data", dataName, fac);

        expectedImage =
                new ImageIO().loadImage(
                        new FileInputStream(
                                getTestResourceFile(imageInFileName)));
        ImageDataSource dataSource = new ImageDataSource("WaterLilies.jpg",
                expectedImage);
        expectedDH = new DataHandler(dataSource);
        OMText binaryNode = new OMTextImpl(expectedDH, true, fac);

        envelope.addChild(body);
        body.addChild(data);
        data.addChild(binaryNode);

        envelope.serializeAndConsume(new FileOutputStream(outBase64File), baseOutputFormat);
        envelope.serializeAndConsume(new FileOutputStream(outMTOMFile), mtomOutputFormat);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

        OMElement element = msgCtxt.getEnvelope().getBody().getFirstElement();
        try {
            //Mapped format cannot handle element with namespaces.. So cannot handle Faults
            if (element instanceof SOAPFault && this instanceof JSONMessageFormatter) {
                SOAPFault fault = (SOAPFault)element;
                OMElement element2 = new OMElementImpl("Fault", null, element.getOMFactory());
                element2.setText(fault.toString());
                element = element2;
            }
            if (element instanceof OMSourcedElementImpl &&
                    getStringToWrite(((OMSourcedElementImpl)element).getDataSource()) != null) {
                String jsonToWrite =
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

            // We want to set the om element and its parents to complete to
            // shutdown the parsing. 
            if (setComplete) {
               
                // Get the root of the document
                OMElementImpl root = (OMElementImpl) om;
                while(root.getParent() instanceof OMElementImpl) {
                    root = (OMElementImpl) root.getParent();
                }
               
                try {  
                    if (!root.isComplete() && root.getBuilder() != null &&
                            !root.getBuilder().isCompleted()) {
                        // Forward the parser to the end so it will close
                        while (root.getBuilder().next() != XMLStreamConstants.END_DOCUMENT) {
                            //do nothing
                        }                   
                    }
                } catch (Exception e) {
                    // Log and continue
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

     * @param localName
     * @param ns
     * @return Returns OMElement.
     */
    public OMElement createOMElement(String localName, OMNamespace ns) {
        return new OMElementImpl(localName, ns, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

    public OMElement createOMElement(String localName, OMNamespace ns) {
        return new OMElementImpl(localName, ns, this);
    }

    public OMElement createOMElement(String localName, OMNamespace ns, OMContainer parent) {
        return new OMElementImpl(localName, ns, parent, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

     * @return Returns OMElement.
     */
    public OMElement createOMElement(String localName, OMNamespace ns,
                                     OMContainer parent,
                                     OMXMLParserWrapper builder) {
        return new OMElementImpl(localName, ns, parent,
                                 builder, this);
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMElementImpl

     * @return Returns the new OMElement
     * @throws OMException if there's a namespace mapping problem
     */
    public OMElement createOMElement(QName qname, OMContainer parent)
            throws OMException {
        return new OMElementImpl(qname, parent, this);
    }
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.