You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by JL <li...@gmail.com> on 2008/02/04 17:18:54 UTC

call web service from synapse mediator

Hello,

I made a Synapse mediator which calls a web service using axis2 generated ws
client (with jaxb binding), for this I had to add some jaxb and axis2
dependencies to synapse/lib. I haven't been able
to get it working because of some jaxb problem which gives the following
error message: 'Unable to create JAXBContext for class: <operations request
message class>', this error comes when I
try to start synapse with my mediator in synapse.xml (it tries to
instantiate the ws client object). I've tried this with different versions
of synapse/axis2/jaxb.. Any ideas what might cause something
like this? Also would it be better to make web service calls from mediator
using synapse endpoint definitions instead of using those axis2 generated ws
clients?

Thanks in advance!

Re: call web service from synapse mediator

Posted by ru...@gmail.com.
Hi,

In order to answer your first problem I need to know the exact
versions of synapse, axis2 and ajaxb that you are using for this.

And for the web service call problem, we do not recommend to write web
service clients to invoke a service unless otherwise the existing
synapse mediators can not handle your requirements, rather you could
use the send mediator with defined endpoint to call the web service,
which is asynchronous. How ever if you want a blocking call to be made
to the service and wait for the response to continue further
processing, you could use the callout mediator.

Can you please elaborate on your exact requirements so that we can
guide you to achieve your requirements with the best possible
mechanism..

Thanks,
Ruwan

On 2/4/08, JL <li...@gmail.com> wrote:
> Hello,
>
> I made a Synapse mediator which calls a web service using axis2 generated ws
> client (with jaxb binding), for this I had to add some jaxb and axis2
> dependencies to synapse/lib. I haven't been able
> to get it working because of some jaxb problem which gives the following
> error message: 'Unable to create JAXBContext for class: <operations request
> message class>', this error comes when I
> try to start synapse with my mediator in synapse.xml (it tries to
> instantiate the ws client object). I've tried this with different versions
> of synapse/axis2/jaxb.. Any ideas what might cause something
> like this? Also would it be better to make web service calls from mediator
> using synapse endpoint definitions instead of using those axis2 generated ws
> clients?
>
> Thanks in advance!
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"