// Create the delivery adapter for the target service (cache it)
System.setProperty("javax.xml.registry.ConnectionFactoryClass",
"org.apache.ws.scout.registry.ConnectionFactoryImpl");
// Create the delivery adapter for the target service (cache it)
ServiceInvoker deliveryAdapter = new ServiceInvoker("MyServiceCategory",
"Webserviceconsumer_wise");
// Create and populate the request message...
Message requestMessage = MessageFactory.getInstance().getMessage(
MessageType.JBOSS_XML);
requestMessage.getBody().add(message);
// Deliver the request message synchronously - timeout after 20
// seconds...
deliveryAdapter.deliverAsync(requestMessage);
}