Examples of OMDataSource


Examples of org.apache.axiom.om.OMDataSource

        SOAPBody body = env.getBody();
        OMElement child = body.getFirstElement();
        assertTrue(child instanceof OMSourcedElement);
        OMSourcedElement omse = (OMSourcedElement) child;
        assertTrue(!omse.isExpanded());
        OMDataSource ds = omse.getDataSource();
        assertTrue(ds instanceof JAXBBlockImpl);
       
        // Now simulate persisting the message
        File theFile = null;
        String theFilename = null;
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

        SOAPBody body = env.getBody();
        OMElement child = body.getFirstElement();
        assertTrue(child instanceof OMSourcedElement);
        OMSourcedElement omse = (OMSourcedElement) child;
        assertTrue(!omse.isExpanded());
        OMDataSource ds = omse.getDataSource();
        assertTrue(ds instanceof JAXBBlockImpl);
       
        // Now simulate persisting the message in memory
        SOAPEnvelope env2 = CopyUtils.copy(env);
       
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

        SOAPBody body = env.getBody();
        OMElement child = body.getFirstElement();
        assertTrue(child instanceof OMSourcedElement);
        OMSourcedElement omse = (OMSourcedElement) child;
        assertTrue(!omse.isExpanded());
        OMDataSource ds = omse.getDataSource();
        assertTrue(ds instanceof JAXBBlockImpl);
       
        // Now simulate persisting the message
        File theFile = null;
        String theFilename = null;
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

        SOAPBody body = env.getBody();
        OMElement child = body.getFirstElement();
        assertTrue(child instanceof OMSourcedElement);
        OMSourcedElement omse = (OMSourcedElement) child;
        assertTrue(!omse.isExpanded());
        OMDataSource ds = omse.getDataSource();
        assertTrue(ds instanceof JAXBBlockImpl);
       
        // Now simulate persisting the message in memory
        SOAPEnvelope env2 = CopyUtils.copy(env);
       
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

            // Create an OMSourcedElement backed by an unmarshalled JAXB object
            OMNamespace ns = factory.createOMNamespace(namespace, reader.getPrefix());
           
            Object jaxb = jdsContext.unmarshal(reader);
           
            OMDataSource ds = new JAXBDataSource(jaxb, jdsContext);
            OMSourcedElement omse = factory.createOMElement(ds, localPart, ns);
           
            parent.addChild(omse);
            JAXBCustomBuilderMonitor.updateTotalCreates();
            return omse;
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

    protected Object _getBOFromOM(OMElement omElement, Object busContext)
        throws XMLStreamException, WebServiceException {
       
        // Shortcut to get business object from existing data source
        if (omElement instanceof OMSourcedElement) {
            OMDataSource ds = ((OMSourcedElement) omElement).getDataSource();
            if (ds instanceof JAXBDataSource) {
                // Update the business context to use the one provided
                // by the datasource
                try {
                    JAXBDSContext dsContext = ((JAXBDataSource) ds).getContext();
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

        for (int i=0; i<40000; i++) {
            buffer.append((char)(32 + random.nextInt(96)));
        }
        String testData = buffer.toString();
        QName qname = new QName("data");
        OMDataSource ds = new WrappedTextNodeOMDataSourceFromReader(qname, new StringReader(testData));
        OMFactory factory = OMAbstractFactory.getOMFactory();
        OMSourcedElement element = new OMSourcedElementImpl(qname, factory, ds);
        assertEquals(testData, element.getText());
    }
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

            // Create an OMSourcedElement backed by an unmarshalled JAXB object
            OMNamespace ns = factory.createOMNamespace(namespace, reader.getPrefix());

            Object jaxb = unmarshaller.unmarshal(reader, type);

            OMDataSource ds = new JAXBDataSource(jaxb, jaxbContext);
            OMElement omse = factory.createOMElement(ds, localPart, ns);

            parent.addChild(omse);
            return omse;
        } catch (JAXBException e) {
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

    public OMElement getOMElement(
            final javax.xml.namespace.QName parentQName,
            final OMFactory factory) throws ADBException {


        OMDataSource dataSource = new ADBDataSource(this, parentQName);
        return factory.createOMElement(dataSource,parentQName);

    }
View Full Code Here

Examples of org.apache.axiom.om.OMDataSource

     * @param key
     * @return requested OMDataSourceExt property or null
     */
    protected boolean hasOMDataSourceProperty(String key) {
        if (!this.isExpanded()) {
            OMDataSource ds = this.getDataSource();
            if (ds instanceof OMDataSourceExt) {
                return ((OMDataSourceExt)ds).hasProperty(key);
            }
        }
        return false;
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.