package org.jboss.esb.client;
import org.jboss.soa.esb.client.ServiceInvoker;
import org.jboss.soa.esb.listeners.message.MessageDeliverException;
import org.jboss.soa.esb.message.Message;
import org.jboss.soa.esb.message.format.MessageFactory;
public class EsbClient
{
public static void main(String[] args)
{
System.setProperty("javax.xml.registry.ConnectionFactoryClass",
"org.apache.ws.scout.registry.ConnectionFactoryImpl");
try
{
Message message = MessageFactory.getInstance().getMessage();
message.getBody().add("Sample payload");
ServiceInvoker invoker = new ServiceInvoker("FirstServiceESB", "SimpleListener");
invoker.deliverAsync(message);
}
catch (final MessageDeliverException e)
{
e.printStackTrace();
}
}
}