Use commons-httpclient (or any other client side http lib) to send an http request.
Guillaume Nodet On 3/24/06, Charles Souillard <[EMAIL PROTECTED]> wrote: > Guillaume, > > In fact I want to use sm-http. > The problem is that the client.html given in soap-binding example only > works with IE I think... > So I was trying to do the same thing in java... > > Have you a bypass ? > > Thanks > Charles > > Guillaume Nodet wrote: > > >How to use the client api really depends on your location. If you can > >access the jbi container, you should use the DefaultServiceMixClient. > >If you are inside a component, you can use the ServiceMixClientFacade. > > Else you have to use the remote client and enable the jms flow (you > >can now have both seda and jms flow). > >Note that activating the jms flow will cluster ServiceMix. > >If this is not what you want, well, use a binding component ;) > > > >Cheers, > >Guillaume Nodet > > > >On 3/24/06, Charles Souillard <[EMAIL PROTECTED]> wrote: > > > > > >>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 > >> > >> > >> > >> > > > > > > >
