Examples of createInOutExchange()


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

            component.getServiceUnitManager().stop("su1");
            component.getServiceUnitManager().shutDown("su1");
            component.getServiceUnitManager().undeploy("su1", path.getAbsolutePath());

            // Send message
            inout = client.createInOutExchange();
            inout.setService(new QName("http://servicemix.apache.org/demo/", "chained"));
            try {
                client.send(inout);
            } catch (MessagingException e) {
                // Ok, the lw component is undeployed
View Full Code Here

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

    public String greetMe(String me) {
        try {
           
            // here use client api to test the injected context to invoke another endpoint
            ServiceMixClient client = new ServiceMixClientFacade(this.context);
            InOut exchange = client.createInOutExchange();
            NormalizedMessage message = exchange.getInMessage();
           
            message.setContent(new StringSource(
                    "<message xmlns='http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper'>"
                    + "  <part>"
View Full Code Here

Examples of org.apache.servicemix.components.util.ComponentSupport.createInOutExchange()

        QName service = getQNameAttribute(namespaceContext, element, "service");
        QName interfaceName = getQNameAttribute(namespaceContext, element, "interface");
        QName operation = getQNameAttribute(namespaceContext, element, "operation");

        InOut outExchange = component.createInOutExchange(service, interfaceName, operation);
        NormalizedMessage out = outExchange.createMessage();
        outExchange.setInMessage(out);


        // lets copy the content into the body
View Full Code Here

Examples of org.apache.servicemix.jbi.api.Destination.createInOutExchange()

    }
   
    public void testInOutExchange() throws Exception {
        // START SNIPPET: inOut
        Destination destination = client.createDestination("service:http://servicemix.org/cheese/myService");
        InOut exchange = destination.createInOutExchange();
       
        NormalizedMessage request = exchange.getInMessage();
        request.setProperty("name", "James");
        request.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
View Full Code Here

Examples of org.apache.servicemix.jbi.api.ServiceMixClient.createInOutExchange()

        EchoComponent echo = new EchoComponent(new QName("echo"), "endpoint");
        container.activateComponent(echo, "echo");

        ServiceMixClient c = container.getClientFactory().createClient();
        InOut me = c.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello/>"));
        me.setService(new QName("echo"));
        c.sendSync(me);
        c.done(me);
View Full Code Here

Examples of org.servicemix.client.ServiceMixClient.createInOutExchange()

    public void testSendSync() throws Exception{
        ApplicationContext ctx=new ClassPathXmlApplicationContext("org/servicemix/jbi/nmr/flow/jms/client.xml");
        ServiceMixClient client=(ServiceMixClient) ctx.getBean("client");
        Thread.sleep(5000);
        InOut exchange=client.createInOutExchange();
        exchange.setService(new QName("http://www.habuma.com/foo","pingService"));
        NormalizedMessage in=exchange.getInMessage();
        in.setContent(new StringSource("<ping>Pinging you</ping>"));
        System.out.println("SENDING; exchange.status="+exchange.getStatus());
        client.sendSync(exchange);
View Full Code Here

Examples of org.servicemix.components.util.ComponentSupport.createInOutExchange()

        QName service = getQNameAttribute(namespaceContext, element, "service");
        QName interfaceName = getQNameAttribute(namespaceContext, element, "interface");
        QName operation = getQNameAttribute(namespaceContext, element, "operation");

        InOut outExchange = component.createInOutExchange(service, interfaceName, operation);
        NormalizedMessage out = outExchange.createMessage();
        outExchange.setInMessage(out);


        // lets copy the content into the body
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.