I'm using the following:
public static ServiceMixClient getClient() {
RemoteServiceMixClient rc = new
RemoteServiceMixClient("tcp://localhost:61616");
try {
rc.init();
rc.start();
} catch (JBIException e) {
System.err.println("Fehler beim Starten des Client");
}
return rc;
}
ServiceMixClient client = getClient();
ComponentContext componentContext = client.getContext();
ServiceEndpoint[] sep = componentContext.getEndpoints(null);
Having this you can then send your Messages to the Endpoints exposed within
the ServiceMix, using the ClientAPI.
greets goldi
rjangra wrote:
>
> I am also trying to get RemoteServiceMixClient, from a stand alone java
> class, to send messages to a component installed in ServiceMix. Not able
> to send the message using the code/configuration given in
> "org.apache.servicemix.client.RemoteServiceMixClientTest.java", from a
> standalone class. Were you able to run RemoteServiceMixClient? If you can
> help me with this.
>
>
>
> rbeeger wrote:
>>
>> Hi!
>>
>> I'm trying to get the RemoteServiceMixClient to run. No matter whether
>> the ServiceMix server is running or not, I get the following exception:
>> Exception in thread "main" java.lang.NullPointerException
>> at
>> org.apache.servicemix.client.DefaultServiceMixClient.createInOnlyExchange(DefaultServiceMixClient.java:83)
>>
>> I have configured the RemoteServiceMixClient in the following way:
>> <bean id="client"
>> class="org.apache.servicemix.client.RemoteServiceMixClient">
>> </bean>
>>
>> When I start the server it's running on the same computer. But since it
>> does not make any difference whether it is running or not, the client
>> doesn't seem to even try to contact it. What is the uri of a locally
>> running ServiceMix server?
>>
>> Cheers & TIA,
>> Robert
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/How-to-configure-RemoteServiceMixClient-tf1761521s12049.html#a9692908
Sent from the ServiceMix - User mailing list archive at Nabble.com.