The unit tests are helpful, but what about setting up something to receive a
message?  Is that possible using a RemoteServiceMixClient instance?  When
using a JBIContainer instance I'm able to simply do something like
"jbiContainer.activateComponent(receverActivationSpec);" after getting an
ActivationSpec using a receiver instance, and it's ready to receive. 

Can I do that with a remote client handle?

Thanks


Gert Vanthienen wrote:
> 
> L.S.,
> 
> On this page (http://servicemix.apache.org/client-api.html), you'll find 
> an introduction to the ServiceMixClient API.  Once you're connected, 
> there isn't that much of a difference between the RemoteServiceMixClient 
> and the other ServiceMixClient implementations.  I'm afraid we don't 
> have any additional code samples available on the website, you can take 
> a look at our unit test classes at 
> http://svn.apache.org/repos/asf/servicemix/smx3/trunk/core/servicemix-core/src/test/java/org/apache/servicemix/client/
>  
> though.
> 
> Gert
> 
> jsexton0 wrote:
>> I created some code, successfully, using examples I found here and there
>> to
>> create a local JBIContainer instance, a couple components to send and
>> receive messages, hooked them together, and it worked fine.  
>>
>> Now I'd like to try using a RemoteServiceMixClient instance.  I'd like to
>> create, in my local application code, a sender and a receiver object,
>> hook
>> them up in to a remote Servicemix and pass a message through.  I am able
>> to
>> connect to the remote server, and do a few other thing, but I'm a bit
>> foggy
>> on the details of how to do the plumbing on this.  
>>
>> RemoteServiceMixClient remoteServiceMixClient = new
>> RemoteServiceMixClient("tcp://192.168.xx.xx:61616");
>> remoteServiceMixClient.init();
>> remoteServiceMixClient.start();
>>
>> This works.  And I can get the current endpoints from it.
>> Now, does the following get me anyplace?
>>
>> componentContext = serviceMixClient.getContext();
>> SenderComponent sender = new SenderComponent();
>> componentContext.activateEndpoint(sender.SERVICE, sender.ENDPOINT);
>>
>> Where SenderComponent looks like this...
>>
>> public class SenderComponent extends ComponentSupport implements Sender {
>>     public static final QName SERVICE = new
>> QName("http://servicemix.org/example/";, "sender");
>>     public static final String ENDPOINT = "sender";
>> etc...
>>
>> I'm guessing here...  Is there some code around that does this?  Thanks
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
> 

-- 
View this message in context: 
http://www.nabble.com/RemoteServiceMixClient---Example--tp17657659p17679757.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to