Package org.apache.axiom.om.impl.llom

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


     * @param source
     * @param localName
     * @param ns
     */
    public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here


     *
     * @param source the data source
     * @param qname the name of the element produced by the data source
     */
    public OMSourcedElement createOMElement(OMDataSource source, QName qname) {
        return new OMSourcedElementImpl(qname, this, source);
    }
View Full Code Here

    public void testGetTextAsStreamWithOMSourcedElement() throws Exception {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        DataSource ds = new RandomDataSource(445566, 32, 128, 20000000);
        QName qname = new QName("a");
        Charset cs = Charset.forName("ascii");
        OMSourcedElement element = new OMSourcedElementImpl(qname, factory,
                new WrappedTextNodeOMDataSourceFromDataSource(qname, ds, cs));
        Reader in = ElementHelper.getTextAsStream(element, true);
        assertFalse(in instanceof StringReader);
        IOTestUtils.compareStreams(new InputStreamReader(ds.getInputStream(), cs), in);
    }
View Full Code Here

   
    public void testWriteTextToWithOMSourcedElement() throws Exception {
        OMFactory factory = OMAbstractFactory.getOMFactory();
        DataSource ds = new RandomDataSource(665544, 32, 128, 20000000);
        QName qname = new QName("a");
        OMSourcedElement element = new OMSourcedElementImpl(qname, factory,
                new WrappedTextNodeOMDataSourceFromDataSource(qname, ds, Charset.forName("ascii")));
        Reader in = new InputStreamReader(ds.getInputStream(), "ascii");
        Writer out = new CharacterStreamComparator(in);
        ElementHelper.writeTextTo(element, out, true); // cache doesn't matter here
        out.close();
View Full Code Here

     * @param source
     * @param localName
     * @param ns
     */
    public OMSourcedElement createOMElement(OMDataSource source, String localName, OMNamespace ns) {
        return new OMSourcedElementImpl(localName, ns, this, source);
    }
View Full Code Here

     *
     * @param source the data source
     * @param qname the name of the element produced by the data source
     */
    public OMSourcedElement createOMElement(OMDataSource source, QName qname) {
        return new OMSourcedElementImpl(qname, this, source);
    }
View Full Code Here

                }
            }
        };
        XmlElement inputXmlElement = operation.getInputElement();
        QName inputElementQName = new QName(inputXmlElement.getNamespace(), inputXmlElement.getName());
        return new OMSourcedElementImpl(inputElementQName, omFactory, omDataSource);
    }
View Full Code Here

                    }
                }
            };

            QName qname = new QName(parameter.getNamespace(), parameter.getName());
            returnOMElement = new OMSourcedElementImpl(qname, OMAbstractFactory.getOMFactory(), omDataSource);

        } catch (MetaDataPopulateException e) {
            throw new OMElementCreationException("Problem in meta data population", e);
        } catch (SchemaGenerationException e) {
            throw new OMElementCreationException("Problem in Schema generation", e);
View Full Code Here

            SOAPFaultDetail detail = factory.createSOAPFaultDetail(soapFault);
            if (!ignoreDetailBlocks) {
                for (int i = 0; i < blocks.length; i++) {
                    // A Block implements OMDataSource.  So create OMSourcedElements
                    // for each of the Blocks.
                    OMSourcedElementImpl element =
                            new OMSourcedElementImpl(blocks[i].getQName(), factory, blocks[i]);
                    detail.addChild(element);
                }
            }
        }
View Full Code Here

    public OMElement createOMElement(QName qname) throws OMException {
        return new OMElementImpl(qname, null, this);
    }

    public OMSourcedElement createOMElement(OMDataSource source) {
        return new OMSourcedElementImpl(this, source);
    }
View Full Code Here

TOP

Related Classes of org.apache.axiom.om.impl.llom.OMSourcedElementImpl

Copyright © 2018 www.massapicom. 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.