Package org.apache.servicemix.client

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


            }
        } else if (me.getFault() != null) {
            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
        }
        log.info(new SourceTransformer().toString(me.getOutMessage().getContent()));
        client.done(me);
    }
   
    protected AbstractXmlApplicationContext createBeanFactory() {
        return new ClassPathXmlApplicationContext("spring.xml");
    }
View Full Code Here


                populateExchange(exchange);
                client.sendSync(exchange);
                checkResult(exchange);
                //assertNotNull(exchange.getMessage("out").getContent());
                // TODO: check out the exchange
                client.done(exchange);

                // Stop and undeploy
                component.getServiceUnitManager().stop(suName);
                component.getServiceUnitManager().shutDown(suName);
                component.getServiceUnitManager().undeploy(suName,
View Full Code Here

            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
        }
        log.info(transformer.toString(me.getOutMessage().getContent()));
        Element el = transformer.toDOMElement(me.getOutMessage());
        assertEquals("2005", textValueOfXPath(el, "/transformed/bookstore/book[1]/year"));
        client.done(me);
    }

    public void testXsltWithElement() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
View Full Code Here

            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
        }
        log.info(transformer.toString(me.getOutMessage().getContent()));
        Element el = transformer.toDOMElement(me.getOutMessage());
        assertEquals("2005", textValueOfXPath(el, "/transformed/book/year"));
        client.done(me);
    }

    public void testXsltDynamic() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
View Full Code Here

            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
        }
        log.info(transformer.toString(me.getOutMessage().getContent()));
        Element el = transformer.toDOMElement(me.getOutMessage());
        assertEquals("2005", textValueOfXPath(el, "/transformed/book/year"));
        client.done(me);
    }

    public void testXsltWithParam() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
View Full Code Here

            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
        }
        log.info(transformer.toString(me.getOutMessage().getContent()));
        Element el = transformer.toDOMElement(me.getOutMessage());
        assertEquals("XQuery Kick Start", textValueOfXPath(el, "/titles/title[1]"));
        client.done(me);
    }

    public void testXQueryInline() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
View Full Code Here

        el = DOMUtil.getFirstChildElement(el);
        assertEquals(new QName("http://saxon.sf.net/xquery-results", "element"), DOMUtil.getQName(el));
        el = DOMUtil.getFirstChildElement(el);
        assertEquals(new QName("title"), DOMUtil.getQName(el));
        assertEquals("XQuery Kick Start", DOMUtil.getElementText(el));
        client.done(me);
    }

    public void testXQueryDynamic() throws Exception {
        DefaultServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOut me = client.createInOutExchange();
View Full Code Here

            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
        }
        log.info(transformer.toString(me.getOutMessage().getContent()));
        Element el = transformer.toDOMElement(me.getOutMessage());
        assertEquals("XQuery Kick Start", textValueOfXPath(el, "/titles/title[1]"));
        client.done(me);
    }

    protected AbstractXmlApplicationContext createBeanFactory() {
        return new ClassPathXmlApplicationContext("spring.xml");
    }
View Full Code Here

        InOut me = client.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        me.setService(new QName("http://servicemix.org/test/", "routingSlip"));
        client.sendSync(me, 5000);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        client.done(me);
    }

}
View Full Code Here

              client.sendSync(io,20000);
              assertEquals(ExchangeStatus.ACTIVE,io.getStatus());
              assertNotNull(io.getOutMessage());
              String result = new SourceTransformer().contentToString(io.getOutMessage());
              matchResponse(expectedResponse, result);
              client.done(io);
          }
        } 
       
        enableProcess(getTestName(), 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.