The mail below shows one major defect: we are not eating our own dogfood:
Step 3 (login to the server via the auth service) should not be needed!
Instead we should be protecting the ws-e service with whatever stuff needed!

Sanjiva.

---------- Forwarded message ----------
From: Amila Suriarachchi <am...@wso2.com>
Date: Tue, Jun 28, 2011 at 10:29 AM
Subject: Re: [esb-java-user] How to subscribe/unsubscribe to a topic using
WS call in WSO2ESB 4.0.0
To: esb-java-u...@wso2.org




On Mon, Jun 27, 2011 at 8:41 PM, Paul Fremantle <p...@wso2.com> wrote:

> Amila
>
> I thought we still supported the standard WS-Eventing APIs?
>

yes. This sample comes with some already generated stubs for ws-event API
and authentication. If some one wants to connect to this service through C++
he can do the following.

1. Generate the code for ws-event API. we use the wsdl stored here[1].
2. Generate the code for Authentication admin[2].
3. Login to the carbon server using the generated code in step 2.
 WSO2 carbon keeps the user login details in the http session. Therefore you
need to pass the session cookie to invoke the real service. Please see[3]
for more details.

4. set the session cookie and invoke the event broker service with the
generated code in [1]

thanks,
Amila.


[1]
https://svn.wso2.org/repos/wso2/branches/carbon/3.2.0/service-stubs/org.wso2.carbon.event.client.stub/3.2.0/src/main/resources/eventing-new.wsdl
[2]
https://svn.wso2.org/repos/wso2/branches/carbon/3.2.0/service-stubs/org.wso2.carbon.event.client.stub/3.2.0/src/main/resources/AuthenticationAdminService.wsdl
[3]
https://svn.wso2.org/repos/wso2/branches/carbon/3.2.0/products/mb/1.0.0/modules/samples/product/wsclient/src/org/sample/ws/MessageBoxSubClient.java



> Paul
>
>
>  On 27 June 2011 16:08, Vuk Mijovic <vmijo...@gmail.com> wrote:
>
>> Thanks for the info, Amila. It is exactly what I needed.
>>
>> I have one more question, though (just out of curiosity). The example
>> shows how to use BrokerClient to subscribe, unsubscribe and publish events.
>> What if I wanted to write a subscribing service in C++ (this service would
>> subscribe itself on start-up), for example? How would I contact the Event
>> Broker in this case? Is there a .wsdl describing Event Broker that I could
>> use?
>>
>> All the best,
>> Vuk
>>
>>
>> On Mon, Jun 27, 2011 at 8:37 AM, Amila Suriarachchi <am...@wso2.com>wrote:
>>
>>> wsclient[1].
>>>
>>> please see the following class[2] which shows how to programatically
>>> subscribes to event broker.
>>>
>>> thanks,
>>> Amila.
>>>
>>>
>>> [1]
>>> https://svn.wso2.org/repos/wso2/branches/carbon/3.2.0/products/mb/1.0.0/modules/samples/product/wsclient
>>> [2]
>>> https://svn.wso2.org/repos/wso2/branches/carbon/3.2.0/products/mb/1.0.0/modules/samples/product/wsclient/src/org/sample/ws/PubSubClient.java
>>>
>>>
>>> On Mon, Jun 27, 2011 at 12:08 AM, Asanka Abeysinghe <asan...@wso2.com>wrote:
>>>
>>>> Hi Amila,
>>>> What is sample should refer?, I couldn't find a sample that can map to
>>>> WS-Eventing subscriptions (as requested by Vuk) with samples package with
>>>> WSO2MB-1.0.
>>>> Thx
>>>> Asanka
>>>>
>>>>
>>>> On Sat, Jun 25, 2011 at 2:36 AM, Amila Suriarachchi <am...@wso2.com>wrote:
>>>>
>>>>> With the current model you can directly subscribes to a topic. Please
>>>>> see the wsclient sample comes with the WSO2 MB 1.0.0.
>>>>>
>>>>> thanks,
>>>>> Amila.
>>>>>
>>>>>  On Thu, Jun 23, 2011 at 8:18 PM, Vuk Mijovic <vmijo...@gmail.com>wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> before the 4.0.0 version subscription/unsubscription requests were
>>>>>> sent to the EventSource which does not exist any more. How can I 
>>>>>> subscribe a
>>>>>> web service to a topic without using management console or JMS API?
>>>>>>
>>>>>> Regards,
>>>>>> Vuk
>>>>>>
>>>>>> _______________________________________________
>>>>>> Esb-java-user mailing list
>>>>>> esb-java-u...@wso2.org
>>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Esb-java-user mailing list
>>>>> esb-java-u...@wso2.org
>>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Asanka Abeysinghe,
>>>> Director, Solutions Architecture,  WSO2,Inc.
>>>> m: +1 408 470 0489, p: +1 408 754 7388 - 51272
>>>> b: http://asanka.abeysinghe.org, t: http://twitter.com/asankama, w:
>>>> http://wso2.com/
>>>>  <http://wso2.com/>
>>>> Lean . Enterprise . Middleware
>>>>
>>>>
>>>> _______________________________________________
>>>> Esb-java-user mailing list
>>>> esb-java-u...@wso2.org
>>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Esb-java-user mailing list
>>> esb-java-u...@wso2.org
>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
>>>
>>>
>>
>> _______________________________________________
>> Esb-java-user mailing list
>> esb-java-u...@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
>>
>>
>
>
> --
> Paul Fremantle
> CTO and Co-Founder, WSO2
> OASIS WS-RX TC Co-chair, VP, Apache Synapse
>
> UK: +44 207 096 0336
> US: +1 646 595 7614
>
> blog: http://pzf.fremantle.org
> twitter.com/pzfreo
> p...@wso2.com
>
>
> http://freo.me/wso2con11
>
> wso2.com Lean Enterprise Middleware
>
> Disclaimer: This communication may contain privileged or other confidential
> information and is intended exclusively for the addressee/s. If you are not
> the intended recipient/s, or believe that you may have received this
> communication in error, please reply to the sender indicating that fact and
> delete the copy you received and in addition, you should not print, copy,
> retransmit, disseminate, or otherwise use the information contained in this
> communication. Internet communications cannot be guaranteed to be timely,
> secure, error or virus-free. The sender does not accept liability for any
> errors or omissions.
>
>
> _______________________________________________
> Esb-java-user mailing list
> esb-java-u...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
>
>

_______________________________________________
Esb-java-user mailing list
esb-java-u...@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user




-- 
Sanjiva Weerawarana, Ph.D.
Founder, Chairman & CEO; WSO2, Inc.;  http://wso2.com/
email: sanj...@wso2.com; phone: +94 11 763 9614; cell: +94 77 787 6880 | +1
650 265 8311
blog: http://sanjiva.weerawarana.org/

Lean . Enterprise . Middleware
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to