* @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