Package org.apache.servicemix.client

Examples of org.apache.servicemix.client.RemoteServiceMixClient


     * @param args main arguments.
     * @throws Exception in case of error.
     */
    public static final void main(String[] args) throws Exception {
        // get the JBI client (remote connection)
        ServiceMixClient client =  new RemoteServiceMixClient("tcp://localhost:61616");
       
        // invoking a service
        // create a in-out exchange
        InOut exchange = client.createInOutExchange();
       
        // get the "in" normalized message of the exchange
        NormalizedMessage inMessage = exchange.getInMessage();
        inMessage.setProperty("name", "smx");
        inMessage.setContent(new StringSource("<hello>world</hello>"));
       
        // define the destination endpoint
        exchange.setService(new QName("http://servicemix.apache.org/samples/wsdl-first", "PersonService"));
       
        // send the exchange
        client.sendSync(exchange);
       
        // get the "out" normalized message
        NormalizedMessage outMessage = exchange.getOutMessage();
       
        // display the content of the "out" message
View Full Code Here

TOP

Related Classes of org.apache.servicemix.client.RemoteServiceMixClient

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.