Discussion:
[Axis2] client-side handlers for multicasting soap via udp
Andreas Bobek
2005-09-27 15:21:14 UTC
Permalink
Hi,

I intend to implement WS-Discovery for Axis. For that purpose I need the
ability to send SOAP messages via UDP as multicast messages as defined in
the WS-Discovery specification.
Unfortunately, Axis allows unicast only. Furthermore WS-Discovery uses URIs
(instead of limited URLs) for the wsa:To addressing header, which are mapped
to IP addresses at a later stage. That's why I need a possibility to step in
the "out flow".

There is a description at the Axis2 site how to accomplish this for
server-side processing (using handlers or modules), but I need it for
client-side processing as well.
I searched this list and found some similar posts, but no answers.

How can I intervene the client-side processing?

Thanks in advance, Andreas Bobek.
Mathew, Jose
2005-09-27 16:07:31 UTC
Permalink
I think you can insert a handler in the out-flow at the client side using
client side handlers..
Assuming using the Axis client API,

org.apache.axis.configuration.FileProvider config = new
org.apache.axis.configuration.FileProvider("com/onions/main/MyHandler.wsdd")
;
org.apache.axis.client.Service service = new
org.apache.axis.client.Service(config);
org.apache.axis.client.Call _call = (org.apache.axis.client.Call)
service.createCall();


And MyHandler.wsdd is:


<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<requestFlow>
<!-- define the client Signing handler configuration -->
<handler type="java:com.onions.eai.util.MyHandler"/>
<handler type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
</requestFlow>
<responseFlow>
<handler type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
</responseFlow>
</globalConfiguration>
<transport name="http"
pivot="java:org.apache.axis.transport.http.HTTPSender"/>
</deployment>


And com.onions.eai.util.MyHandler is:



public class MyHandler extends org.apache.axis.handlers.BasicHandler {


public MyHandler() {
super();
}


/* (non-Javadoc)
* @see
org.apache.axis.Handler#invoke(org.apache.axis.MessageContext)
*/
public void invoke(MessageContext context) {

// Your code to handle out going request

}


Does that help your scenario? You can insert a handler in the <responseFlow>
also, if you need.

Jose.



-----Original Message-----
From: Andreas Bobek [mailto:***@uni-rostock.de]
Sent: Tuesday, September 27, 2005 10:21 AM
To: axis-***@ws.apache.org
Subject: [Axis2] client-side handlers for multicasting soap via udp

Hi,

I intend to implement WS-Discovery for Axis. For that purpose I need the
ability to send SOAP messages via UDP as multicast messages as defined in
the WS-Discovery specification.
Unfortunately, Axis allows unicast only. Furthermore WS-Discovery uses URIs
(instead of limited URLs) for the wsa:To addressing header, which are mapped
to IP addresses at a later stage. That's why I need a possibility to step in
the "out flow".

There is a description at the Axis2 site how to accomplish this for
server-side processing (using handlers or modules), but I need it for
client-side processing as well.
I searched this list and found some similar posts, but no answers.

How can I intervene the client-side processing?

Thanks in advance, Andreas Bobek.
Andreas Bobek
2005-09-27 16:15:55 UTC
Permalink
Hello Jose,

thank you for your quick answer.
It seems your code is for Axis 1.x (there are no packages
org.apache.axis.configuration and org.apache.axis.client in Axis2).

I need exactly the same for Axis2.


Thanks, Andreas.



-----Ursprüngliche Nachricht-----
Von: Mathew, Jose [mailto:***@siemens-emis.com]
Gesendet: Dienstag, 27. September 2005 18:08
An: axis-***@ws.apache.org
Betreff: RE: [Axis2] client-side handlers for multicasting soap via udp

I think you can insert a handler in the out-flow at the client side using
client side handlers..
Assuming using the Axis client API,

org.apache.axis.configuration.FileProvider config = new
org.apache.axis.configuration.FileProvider("com/onions/main/MyHandler.wsdd")
;
org.apache.axis.client.Service service = new
org.apache.axis.client.Service(config);
org.apache.axis.client.Call _call = (org.apache.axis.client.Call)
service.createCall();


And MyHandler.wsdd is:


<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<requestFlow>
<!-- define the client Signing handler configuration -->
<handler type="java:com.onions.eai.util.MyHandler"/>
<handler type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
</requestFlow>
<responseFlow>
<handler type="java:org.apache.axis.handlers.SimpleSessionHandler"/>
</responseFlow>
</globalConfiguration>
<transport name="http"
pivot="java:org.apache.axis.transport.http.HTTPSender"/>
</deployment>


And com.onions.eai.util.MyHandler is:



public class MyHandler extends org.apache.axis.handlers.BasicHandler {


public MyHandler() {
super();
}


/* (non-Javadoc)
* @see
org.apache.axis.Handler#invoke(org.apache.axis.MessageContext)
*/
public void invoke(MessageContext context) {

// Your code to handle out going request

}


Does that help your scenario? You can insert a handler in the <responseFlow>
also, if you need.

Jose.



-----Original Message-----
From: Andreas Bobek [mailto:***@uni-rostock.de]
Sent: Tuesday, September 27, 2005 10:21 AM
To: axis-***@ws.apache.org
Subject: [Axis2] client-side handlers for multicasting soap via udp

Hi,

I intend to implement WS-Discovery for Axis. For that purpose I need the
ability to send SOAP messages via UDP as multicast messages as defined in
the WS-Discovery specification.
Unfortunately, Axis allows unicast only. Furthermore WS-Discovery uses URIs
(instead of limited URLs) for the wsa:To addressing header, which are mapped
to IP addresses at a later stage. That's why I need a possibility to step in
the "out flow".

There is a description at the Axis2 site how to accomplish this for
server-side processing (using handlers or modules), but I need it for
client-side processing as well.
I searched this list and found some similar posts, but no answers.

How can I intervene the client-side processing?

Thanks in advance, Andreas Bobek.
Saminda Abeyruwan
2005-09-28 05:10:57 UTC
Permalink
Post by Andreas Bobek
There is a description at the Axis2 site how to accomplish this for
server-side processing (using handlers or modules), but I need it for
client-side processing as well.
You need to provide a repository for the "Call" to handles moules in
client side. This reposity shoud contain axis2.xml and "modules"
directory. Axis2.xml should configure to handle handlers in the
phases.."inflow, outflow..." in client side.

ex :

say you have the reposity in /usr/tmp/rep, where it inclueds axis2.xml
and modules dir. modules dir contains the .mar 's you need to engaged.
Cofigure axis2.xml for you phases specification.

In you client yous the Constructoyr Call(String cliertRepo).

A sample is provided in samples/userguide to acomplished this task.

Saminda
Saminda Abeyruwan
2005-09-28 05:24:53 UTC
Permalink
Post by Saminda Abeyruwan
Post by Andreas Bobek
There is a description at the Axis2 site how to accomplish this for
server-side processing (using handlers or modules), but I need it for
client-side processing as well.
You need to provide a repository for the "Call" to handles moules in
client side. This reposity shoud contain axis2.xml and "modules"
directory. Axis2.xml should configure to handle handlers in the
phases.."inflow, outflow..." in client side.
say you have the reposity in /usr/tmp/rep, where it inclueds axis2.xml
and modules dir. modules dir contains the .mar 's you need to engaged.
Cofigure axis2.xml for you phases specification.
In you client use the Constructor Call(/usr/tmp/rep).
A sample is provided in samples/userguide to acomplished this task.
Saminda
Sorry for the spelling mistakes.

Saminda
Andreas Bobek
2005-09-28 17:48:18 UTC
Permalink
Hi Saminda,

thank you for the hint. I overlooked this example. Today I tested it as you
wrote. Now I can at least step in the out flow successfully.
Thank you once again.

Andreas Bobek.


------------------------------------
Post by Saminda Abeyruwan
Post by Andreas Bobek
There is a description at the Axis2 site how to accomplish this for
server-side processing (using handlers or modules), but I need it for
client-side processing as well.
You need to provide a repository for the "Call" to handles moules in
client side. This reposity shoud contain axis2.xml and "modules"
directory. Axis2.xml should configure to handle handlers in the
phases.."inflow, outflow..." in client side.
say you have the reposity in /usr/tmp/rep, where it inclueds axis2.xml
and modules dir. modules dir contains the .mar 's you need to engaged.
Cofigure axis2.xml for you phases specification.
In you client use the Constructor Call(/usr/tmp/rep).
A sample is provided in samples/userguide to acomplished this task.
Saminda
Sorry for the spelling mistakes.

Saminda

Loading...