Examples of deliverSync()


Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

                        Map params = new HashMap();

                        params.put("sayGoodbye.message", "Goodbye Henry!!");
                        message.getBody().add(params);

                        message = invoker.deliverSync(message, 10000);

                        String soapResponse = (String) message.getBody().get();
                        assertEquals("<response/>", soapResponse);
                    }
                }.setServiceConfig(esbConfig).run();
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

    public void test_String2String() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "String");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(new String(personXmlBytes));
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", message.getBody().get());
    }

    public void test_bytes2String() throws MessageDeliverException, RegistryException, FaultMessageException {
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

    public void test_bytes2String() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "String");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(personXmlBytes);
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", message.getBody().get());
    }

    public void test_InputStream2String() throws MessageDeliverException, RegistryException, FaultMessageException {
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

    public void test_InputStream2String() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "String");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(new ByteArrayInputStream(personXmlBytes));
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", message.getBody().get());
    }

    public void test_Reader2String() throws MessageDeliverException, RegistryException, FaultMessageException {
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

    public void test_Reader2String() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "String");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(new StringReader(new String(personXmlBytes)));
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", message.getBody().get());
    }

    public void test_String2Bytes() throws MessageDeliverException, RegistryException, FaultMessageException {
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

    public void test_String2Bytes() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "Bytes");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(new String(personXmlBytes));
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", new String((byte[]) message.getBody().get()));
    }

    public void test_Object2String() throws MessageDeliverException, RegistryException, FaultMessageException {
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

    public void test_Object2String() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "Person");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(new Person1("Tom", 300));
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom\" is=\"300\">", message.getBody().get());
    }

    public void test_Object2Object() throws MessageDeliverException, RegistryException, FaultMessageException {
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

    public void test_Object2Object() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "Person2Person");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(new Person1("Tom", 300));
        message = invoker.deliverSync(message, 30000);

        Person2 person2 = (Person2) message.getBody().get();
        assertEquals("Tom", person2.getName());
        assertEquals(300, person2.getAge());
    }
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

        sourceResult.setSource(new ByteSource(personXmlBytes));
        sourceResult.setResult(result);

        message.getBody().add(sourceResult);
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", result.getResult());
    }
}
View Full Code Here

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverSync()

        // Create the message and set the profile on it...
        message.getBody().add(new String(personXmlBytes));
        message.getProperties().setProperty(Properties.MESSAGE_PROFILE, profile);

        message = invoker.deliverSync(message, 30000);

        assertEquals(expected, message.getBody().get());
    }
}
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.