// 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",
"WebserviceConsumer2");
// Create and populate the request message...
Message requestMessage = MessageFactory.getInstance().getMessage(
MessageType.JAVA_SERIALIZED);
// Deliver the request message synchronously - timeout after 20
// seconds...
deliveryAdapter.deliverAsync(requestMessage);
// need to cleanup connection pool for service invoker
//deliveryAdapter.close();
}