Examples of JAXBDataSource


Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

       
        // Verify that the OM Element is backed by an unmarshalled jaxb object
        assertTrue(om instanceof OMSourcedElement);
        OMDataSource ds = ((OMSourcedElement) om).getDataSource();
        assertTrue(ds instanceof JAXBDataSource);
        JAXBDataSource jaxbDS = (JAXBDataSource) ds;
        Object jaxbObject = jaxbDS.getObject();
        assertTrue(jaxbObject instanceof EchoString);
        EchoString result = (EchoString) jaxbObject;
        assertTrue(result.getInput().equals("Hello World"));
    }
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

        // On inbound, there will already be a probably be an OM
        // which represents the message.  In this scenario, the OM contains
        // a OMSourcedElement that is backed by EchoString.
        OMFactory omFactory = OMAbstractFactory.getOMFactory();
        JAXBDSContext dsContext = new JAXBDSContext(jaxbContext);
        JAXBDataSource ds = new JAXBDataSource(jaxb, dsContext);
        OMNamespace ns = omFactory.createOMNamespace(expectedQName.getNamespaceURI(), "pre");
        OMElement om = omFactory.createOMElement(ds, expectedQName.getLocalPart(), ns);
       

        // Create a Block from the inflow. 
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

    public OMDataSourceExt copy() throws OMException {
       
        if (DEBUG_ENABLED) {
            log.debug("Making a copy of the JAXB object");
        }
        return new JAXBDataSource(this.getObject(),
                                  (JAXBDSContext) this.getBusinessContext());
    }
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

       
        // Verify that the OM Element is backed by an unmarshalled jaxb object
        assertTrue(om instanceof OMSourcedElement);
        OMDataSource ds = ((OMSourcedElement) om).getDataSource();
        assertTrue(ds instanceof JAXBDataSource);
        JAXBDataSource jaxbDS = (JAXBDataSource) ds;
        Object jaxbObject = jaxbDS.getObject();
        assertTrue(jaxbObject instanceof EchoString);
        EchoString result = (EchoString) jaxbObject;
        assertTrue(result.getInput().equals("Hello World"));
       
        // Make sure that the local name can be obtained without expansion
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

       
        // Verify that the OM Element is backed by an unmarshalled jaxb object
        assertTrue(om instanceof OMSourcedElement);
        OMDataSource ds = ((OMSourcedElement) om).getDataSource();
        assertTrue(ds instanceof JAXBDataSource);
        JAXBDataSource jaxbDS = (JAXBDataSource) ds;
        Object jaxbObject = jaxbDS.getObject();
        assertTrue(jaxbObject instanceof EchoString);
        EchoString result = (EchoString) jaxbObject;
        assertTrue(result.getInput().equals("Hello World"));
       
        // Make sure that the local name can be obtained without expansion
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

    public OMDataSourceExt copy() throws OMException {
       
        if (DEBUG_ENABLED) {
            log.debug("Making a copy of the JAXB object");
        }
        return new JAXBDataSource(this.getObject(),
                                  (JAXBDSContext) this.getBusinessContext());
    }
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

        }
       
        if (omElement instanceof OMSourcedElement) {
           
            if ( ((OMSourcedElement) omElement).getDataSource() instanceof JAXBDataSource) {
                JAXBDataSource ds = (JAXBDataSource) ((OMSourcedElement)omElement).getDataSource();
                JAXBDSContext dsContext = ds.getContext();
                try {
                    if (dsContext.getJAXBContext() == ((JAXBBlockContext)context).getJAXBContext()) {
                        // Shortcut, use existing JAXB object
                        Object jaxb = ds.getObject();
                        return new JAXBBlockImpl(jaxb, (JAXBBlockContext)context, qName, this);
                    }
                } catch (JAXBException e) {
                    if (log.isDebugEnabled()) {
                        log.debug("Falling back to using normal unmarshalling approach. " + e.getMessage());
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

        // On inbound, there will already be a probably be an OM
        // which represents the message.  In this scenario, the OM contains
        // a OMSourcedElement that is backed by EchoString.
        OMFactory omFactory = OMAbstractFactory.getOMFactory();
        JAXBDSContext dsContext = new JAXBDSContext(jaxbContext);
        JAXBDataSource ds = new JAXBDataSource(jaxb, dsContext);
        OMNamespace ns = omFactory.createOMNamespace(expectedQName.getNamespaceURI(), "pre");
        OMElement om = omFactory.createOMElement(ds, expectedQName.getLocalPart(), ns);
       

        // Create a Block from the inflow. 
View Full Code Here

Examples of org.apache.axis2.datasource.jaxb.JAXBDataSource

        // On inbound, there will already be a probably be an OM
        // which represents the message.  In this scenario, the OM contains
        // a OMSourcedElement that is backed by EchoString.
        OMFactory omFactory = OMAbstractFactory.getOMFactory();
        JAXBDSContext dsContext = new JAXBDSContext(jaxbContext);
        JAXBDataSource ds = new JAXBDataSource(jaxb, dsContext);
        OMNamespace ns = omFactory.createOMNamespace(expectedQName.getNamespaceURI(), null);
        OMElement om = omFactory.createOMElement(ds, expectedQName.getLocalPart(), ns);
       

        // Create a Block from the inflow. 
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.