You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by fernado <fe...@alcatel-lucent.com> on 2010/07/12 15:56:11 UTC

How to use the Client API of wsn2005 in CXF bundle?

ALL:
The document said that we can use below confiuration in bus to call the
client API of wsn2005 
Dynamic configuration inside the JBI bus

In addition to the deployment of service units, you can also create pull
points or subscriptions dynamically from inside the JBI bus by using a
simple API.

To create a subscription for a given JBI endpoint, you can use the following
code:

QName service = ...;

String endpoint = ...;

String topic = ...;

NotificationBroker wsnBroker = new NotificationBroker(getContext());

EndpointReferenceType consumer = new EndpointReferenceType();

consumer.setAddress(new AttributedURIType());

consumer.getAddress().setValue(service.getNamespaceURI() + "/" +
service.getLocalPart() + "/" + endpoint);

wsnBroker.subscribe(consumer, topic);


But I am developing my application as bundle. I guesses the getContext is
the wsn2005 componet's context. How can I get this? or  What can I use for
this getContext().
I really do not how to do this? Who can help me?
thanks 
fernado

-- 
View this message in context: http://servicemix.396122.n5.nabble.com/How-to-use-the-Client-API-of-wsn2005-in-CXF-bundle-tp1046360p1046360.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.