Hi Thomas

The easiest way to accomplish this is through a Class mediator. i.e. you write a simple POJO to initialize (for JNDI lookup etc) your code, and then on each received message, you perform your call to the EJB, and then based on the result, enrich/transform the message as necessary and then pass it on. Your code will have full access to the message, and thus you could do anything you want. Of course, before your class mediator intercepts the message (and after) you could use the other mediators to perform your call only on a specific filter etc. or perform transforms etc through other means..

Please see the following link to see how you could write a sample mediator http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resources/Synapse_Samples.html?content-type=text%2Fhtml&view=co#Sample510

Also see http://ws.apache.org/synapse/Synapse_Extending.html

Also see http://issues.apache.org/jira/browse/SYNAPSE-50 for a sample mediator by one of our users

If you wish, you may also use Spring to wire up your mediator.. Let me know if you need any more help on this!

asankha

Thomas Lundqvist wrote:
Hello!

I would like to understand more about the possibilities of invoking external
components when using Synapse as a web service proxy. In one instance I
would like the proxy to intercept a web service call from a Client. The
proxy should make a call to an EJB for e g performing an evaluation based on the request data. After the (successful) evaluation the call should proceed
by invoking the Server. In this example the proxy (Synapse) would expose
same WS interface as the Server. My main concern is how to integrate / call
the EJB.

Can someone give some pointers / examples on how to achieve this with
Synapse? Any views on the scenario as such are also appreciated...

Many thanks,

Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to