Package test

Examples of test.ObjectFactory


        // Get the BlockFactory
        JAXBBlockFactory f = (JAXBBlockFactory)
        FactoryRegistry.getFactory(JAXBBlockFactory.class);

        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());
        JAXBContext jaxbContext = context.getJAXBContext();

        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(jaxbContext);
View Full Code Here


     * Serializing it.
     */
    public void testJAXBSourceInFlow1()throws Exception{
        //  Create a jaxb object
        try{
            ObjectFactory factory = new ObjectFactory();
            EchoString jaxb = factory.createEchoString();
            jaxb.setInput("Hello World");
            JAXBContext context = JAXBContext.newInstance("test");

            JAXBSource src = new JAXBSource(context.createMarshaller(), jaxb);
            BlockFactory f = (SourceBlockFactory)
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory f = (JAXBBlockFactory)
        FactoryRegistry.getFactory(JAXBBlockFactory.class);

        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());

        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(context.getJAXBContext());
        QName expectedQName = jbi.getElementName(jaxb);
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory f = (JAXBBlockFactory)
        FactoryRegistry.getFactory(JAXBBlockFactory.class);

        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());

        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(context.getJAXBContext());
        QName expectedQName = jbi.getElementName(jaxb);
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory f = (JAXBBlockFactory)
        FactoryRegistry.getFactory(JAXBBlockFactory.class);

        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());

        // On inbound, there will already be a XMLStreamReader (probably from OM)
        // which represents the message.  We will simulate this with inflow.
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory f = (JAXBBlockFactory)
        FactoryRegistry.getFactory(JAXBBlockFactory.class);

        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());

        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(context.getJAXBContext());
        QName expectedQName = jbi.getElementName(jaxb);
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory f = (JAXBBlockFactory)
        FactoryRegistry.getFactory(JAXBBlockFactory.class);

        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());

        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(context.getJAXBContext());
        QName expectedQName = jbi.getElementName(jaxb);
View Full Code Here

        // Get the BlockFactory
        JAXBBlockFactory f = (JAXBBlockFactory)
        FactoryRegistry.getFactory(JAXBBlockFactory.class);

        // Create a jaxb object
        ObjectFactory factory = new ObjectFactory();
        EchoString jaxb = factory.createEchoString();
        jaxb.setInput("Hello World");
        JAXBBlockContext context = new JAXBBlockContext(EchoString.class.getPackage().getName());
        JAXBContext jaxbContext = context.getJAXBContext();

        JAXBIntrospector jbi = JAXBUtils.getJAXBIntrospector(jaxbContext);
View Full Code Here

     * Serializing it.
     */
    public void testJAXBSourceInFlow1()throws Exception{
        //  Create a jaxb object
        try{
            ObjectFactory factory = new ObjectFactory();
            EchoString jaxb = factory.createEchoString();
            jaxb.setInput("Hello World");
            JAXBContext context = JAXBContext.newInstance("test");

            JAXBSource src = new JAXBSource(context.createMarshaller(), jaxb);
            BlockFactory f = (SourceBlockFactory)
View Full Code Here

    * Simple XML/HTTP Message Test
    * @throws Exception
    */
   public void testSimple() throws Exception {
       Dispatch<Object> dispatch = getDispatch();
       ObjectFactory factory = new ObjectFactory();
       EchoString request = factory.createEchoString();        
       request.setInput("SYNC JAXB XML PAYLOAD TEST");
      
       // Invoke the Dispatch<Object>
        TestLogger.logger.debug(">> Invoking sync Dispatch with JAX-B Parameter");
       EchoString response = (EchoString) dispatch.invoke(request);
View Full Code Here

TOP

Related Classes of test.ObjectFactory

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.