Examples of createInOutExchange()


Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        client.done(me);
    }

    public void testXsltWithParam() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("urn:test", "xslt-params"));
        me.getInMessage().setContent(new StringSource("<sample id='777888' sent='"
                + new Date() + "'>hello world!</sample>"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        assertEquals("4002", textValueOfXPath(el, "//integer"));
    }

    public void testXQuery() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("urn:test", "xquery"));
        me.getInMessage().setContent(new StreamSource(getClass().getResourceAsStream("/books.xml")));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getError() != null) {
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        client.done(me);
    }

    public void testXQueryInline() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("urn:test", "xquery-inline"));
        me.getInMessage().setContent(new StreamSource(getClass().getResourceAsStream("/books.xml")));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getError() != null) {
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        client.done(me);
    }

    public void testXQueryDynamic() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("urn:test", "xquery-dynamic"));
        me.getInMessage().setContent(new StreamSource(getClass().getResourceAsStream("/books.xml")));
        me.getInMessage().setProperty("xquery.source", getClass().getResource("/query.xq"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

public class MySpringComponentTest extends SpringTestSupport {

    public void test() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("urn:test", "service"));
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        // By default, the endpoint throws an UnsupportedOperationException
        // so do not test anything here
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        jbi.activateComponent(echo, "echo");

        jbi.start();

        ServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("bean"));
        me.setOperation(new QName("receive"));
        NormalizedMessage nm = me.getInMessage();
        nm.setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

    private static Log logger =  LogFactory.getLog(Jsr181ComponentTest.class);

    public void test() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setInterfaceName(new QName("http://test", "EchoPortType"));
        me.getInMessage().setContent(new StringSource("<echo xmlns='http://test'><echoin0>world</echoin0></echo>"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getFault() != null) {
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        jbi.activateComponent(echo2, "echo2");

        jbi.start();

        ServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
        me.setService(new QName("bean"));
        me.setOperation(new QName("receive"));
        NormalizedMessage nm = me.getInMessage();
        nm.setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        assertNotNull(EchoService.getInstance());
        assertNotNull(EchoService.getInstance().getContext());
       
        // Call it
        DefaultServiceMixClient client = new DefaultServiceMixClient(container);
        InOut me = client.createInOutExchange();
        me.setInterfaceName(new QName("http://test", "EchoServicePortType"));
        me.getInMessage().setContent(new StringSource("<echo xmlns='http://test'><in0>world</in0></echo>"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getFault() != null) {
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange()

        assertNotNull(EchoService.getInstance());
        assertNotNull(EchoService.getInstance().getContext());
       
        // Call it
        DefaultServiceMixClient client = new DefaultServiceMixClient(container);
        InOut me = client.createInOutExchange();
        me.setInterfaceName(new QName("http://test", "EchoService2PortType"));
        me.getInMessage().setContent(new StringSource("<echo xmlns='http://test'><in0>world</in0></echo>"));
        client.sendSync(me);
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getFault() != null) {
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.