Hi all,

I am trying to create a simple java client which sends an exchange to an installed component.
I am using SM embeded in a web app.
My problem is all examples I can find in the svn head are based on a spring xml file which defines the jbi container and at least one component. This is not conforming to my case as my container is already started and my components were deployed using SU method.

I tried creating a client by doing :

ServiceMixClient client = new RemoteServiceMixClient();
or
ServiceMixClient = new DefaultServiceMixClient()

but I get a NPE :
java.lang.NullPointerException
at org.apache.servicemix.client.DefaultServiceMixClient.createInOutExchange(DefaultServiceMixClient.java:96)

This line is corresponding to
InOut exchange = getExchangeFactory().createInOutExchange();
It means getExchangeFactory() returned a null value.
I think this is due to the context value which is null in my case.
I know there is another way to create a client which is :
ServiceMixClient client = new ServiceMixClientFacade(ComponentContext);

but how can I get a ComponentContext ?

Thanks,
Charles

Reply via email to