You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Pe...@mdsuk.com on 2006/01/24 16:25:51 UTC

Possible with Service Mix

Hi,

I have a fairly simple scenario, and I would like to know if it is a) 
achievable with ServiceMix b) if so, what is the best way of implementing 
it?

I would like to expose a Web Service via ServiceMix, with a specified WSDL 
document
Upon receipt of a message corresponding to this WSDL, I would like to 
transform this message using XSLT into another message (I know this is 
possible)
Invoke two further Web Services using the new message
Based on the results of these messages, construct a response to the 
original Web Service invocation and return that to the sender.

I appreciate that this is a classic BPEL use-case, however I would like to 
know if it is possible to implement using entirely ServiceMix components.

The first issue is finding a way of exposing a Web Service via Service 
Mix, where I can pass the message onto the Bus, continue the business 
logic and then reply to the same invocation - is this possible?

If this is not possible, I may have to construct an asynchronous style 
service and perform a callback - what is the best way of performing this?

Secondly, what is the best way of invoking an existing Web Service - there 
seem to be various SOAP stacks, however JAX WS seems to be deprecated and 
there exists no current documentation for the JSR 181 implementation.

Any help would be appreciated.

Regards,
Peter Dolukhanov

Re: Possible with Service Mix

Posted by Guillaume Nodet <gu...@worldonline.fr>.
See comments inline

Peter.Dolukhanov@mdsuk.com wrote:

>Hi,
>
>I have a fairly simple scenario, and I would like to know if it is a) 
>achievable with ServiceMix b) if so, what is the best way of implementing 
>it?
>
>I would like to expose a Web Service via ServiceMix, with a specified WSDL 
>document
>Upon receipt of a message corresponding to this WSDL, I would like to 
>transform this message using XSLT into another message (I know this is 
>possible)
>Invoke two further Web Services using the new message
>Based on the results of these messages, construct a response to the 
>original Web Service invocation and return that to the sender.
>
>I appreciate that this is a classic BPEL use-case, however I would like to 
>know if it is possible to implement using entirely ServiceMix components.
>
>The first issue is finding a way of exposing a Web Service via Service 
>Mix, where I can pass the message onto the Bus, continue the business 
>logic and then reply to the same invocation - is this possible?
>  
>
The idea of JBI is to seperate the binding components from the service 
engines.
Your real service should be exposed as a service engine on the jbi bus, 
and a binding component can be used to bridge http or http+soap.

In JBI you can use several meps :
  * in-out for response/request style
  * in-only for messaging style
All meps can be handled synchronously or asynchronously.
If you come from an http request, the easiest way is to use synchronous 
in-out meps so that you can answer the client (but this is not the most 
scalable way).

>If this is not possible, I may have to construct an asynchronous style 
>service and perform a callback - what is the best way of performing this?
>  
>
Use in-only meps or asynchronous in-out meps.

>Secondly, what is the best way of invoking an existing Web Service - there 
>seem to be various SOAP stacks, however JAX WS seems to be deprecated and 
>there exists no current documentation for the JSR 181 implementation.
>  
>
You should try the servicemix-http component.
Here are some examples showing how it can be used:
    
http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/servicemix/trunk/servicemix-http/src/test/resources/org/apache/servicemix/http/addressing.xml?rev=369989
You can also use it to deploy wsdls:
   
http://svn.apache.org/viewcvs.cgi/incubator/servicemix/trunk/servicemix-http/src/test/resources/consumer/http.wsdl?rev=369989&view=markup

Cheers,
Guillaume Nodet

>Any help would be appreciated.
>
>Regards,
>Peter Dolukhanov
>  
>