You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Bastian Köhler <ba...@gmx.de> on 2006/11/20 14:54:42 UTC

[AXIS2]Savan Module - possible to notify client instead of another service?

Hi,
I have a question about the Axis2 Savan Module, which provides WS-Eventing
support.
I downloaded the sample application code from the svn repository. In the
example a listenerservice is notified about new events (produced by another
service). 
Is it also possible to send the notification messages to the client instead
of another Webservice? I want the client(s) to be notified about events (or
new data). And the second question is, how to do that. My first idea was to
use the simplehttpserver on the clientside and register a service, which is
then used as the Listenerservice...Does this make sense or are there any
better solutions to my problem.

Any suggestion would be helpful. Thanks in advance.


Bastian


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


AW: [AXIS2]Savan Module - possible to notify client instead of another service?

Posted by Bastian Köhler <ba...@gmx.de>.
Hi Chamikara,
Thanks for your answer. I tried it today as suggested, but it didn't work.
The problem is, that i do not get any exception or axis fault, but the
messages aren't delivered to my client. 
I first start a http server on the client side and register the service
(POJO), which will be the endpoint for the messages.
...
ConfigurationContext context =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null);
AxisService service =
AxisService.createService(ListnerService1.class.getName(),
context.getAxisConfiguration());
context.getAxisConfiguration().addService(service);       
SimpleHTTPServer server = new SimpleHTTPServer(context, 8081);
server.start();
...

Then the Subscription is done.

String address = "http://127.0.0.1:8081/axis2/services/ListnerService1";
EventingClientBean bean = new EventingClientBean ();
String id = "id1";
bean.setDeliveryEPR (new EndpointReference (address));   
eventingClient.subscribe(bean,ID);


The http-Server on the client side is running
(http://localhost:8081/axis2/services/ListnerService1 shows the generated
wsdl) and on the server side the 
Messages are generated. 
In the API there is another method to create a service
"createClientSideService". Do i have to use this method instead? 


Bastian.

>-----Ursprüngliche Nachricht-----
>Von: Chamikara Jayalath [mailto:chamikaramj@gmail.com] 
>Gesendet: Mittwoch, 22. November 2006 00:22
>An: axis-user@ws.apache.org
>Betreff: Re: [AXIS2]Savan Module - possible to notify client 
>instead of another service?
>
>Hi Bastian,
>
>Yes. The way u suggested will certainly work. All u need to 
>have is a endpoint that is capable of capturing the events 
>send by the EventSource.
>
>You can set this endpoint as the delivery EPR, of the EventingClient. 
>e.g.:
>        String address = "address of your desired delivery endpoint";
>        EventingClientBean bean = new EventingClientBean ();
>        String id = "id1";
>        bean.setDeliveryEPR (new EndpointReference (address));   
>        eventingClient.subscribe(bean,ID);
>
>
>Thanks,
>Chamikara
>
>
>
>On 11/20/06, Bastian Köhler <ba...@gmx.de> wrote:
>
>	Hi,
>	I have a question about the Axis2 Savan Module, which 
>provides WS-Eventing
>	support.
>	I downloaded the sample application code from the svn 
>repository. In the
>	example a listenerservice is notified about new events 
>(produced by another 
>	service).
>	Is it also possible to send the notification messages 
>to the client instead
>	of another Webservice? I want the client(s) to be 
>notified about events (or
>	new data). And the second question is, how to do that. 
>My first idea was to 
>	use the simplehttpserver on the clientside and register 
>a service, which is
>	then used as the Listenerservice...Does this make sense 
>or are there any
>	better solutions to my problem.
>	
>	Any suggestion would be helpful. Thanks in advance. 
>	
>	
>	Bastian
>	
>	
>	
>---------------------------------------------------------------------
>	To unsubscribe, e-mail: 
>axis-user-unsubscribe@ws.apache.org 
><ma...@ws.apache.org> 
>	For additional commands, e-mail: axis-user-help@ws.apache.org
>	
>	
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [AXIS2]Savan Module - possible to notify client instead of another service?

Posted by Chamikara Jayalath <ch...@gmail.com>.
Hi Bastian,

Yes. The way u suggested will certainly work. All u need to have is a
endpoint that is capable of capturing the events send by the EventSource.

You can set this endpoint as the delivery EPR, of the EventingClient.
e.g.:
        String address = "address of your desired delivery endpoint";
        EventingClientBean bean = new EventingClientBean ();
        String id = "id1";
        bean.setDeliveryEPR(new EndpointReference (address));
        eventingClient.subscribe(bean,ID);


Thanks,
Chamikara


On 11/20/06, Bastian Köhler <ba...@gmx.de> wrote:
>
> Hi,
> I have a question about the Axis2 Savan Module, which provides WS-Eventing
> support.
> I downloaded the sample application code from the svn repository. In the
> example a listenerservice is notified about new events (produced by
> another
> service).
> Is it also possible to send the notification messages to the client
> instead
> of another Webservice? I want the client(s) to be notified about events
> (or
> new data). And the second question is, how to do that. My first idea was
> to
> use the simplehttpserver on the clientside and register a service, which
> is
> then used as the Listenerservice...Does this make sense or are there any
> better solutions to my problem.
>
> Any suggestion would be helpful. Thanks in advance.
>
>
> Bastian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>