You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Seguy <ca...@gmail.com> on 2006/09/12 18:12:02 UTC

JSR181 Endpoint question

Hi,

My team is involved in a project that has chosen Servicemix as our ESB
platform. We gonna develop our components as endpoints and we want to
invoke different methods/operations for each endpoint. At a first
glance, it seems that the JSR181 component could fit to our idea.

It seems that the invocation of a specific method is done by the
JSR181 endpoint via a soap message send to XFire:

<?xml version="1.0" encoding="UTF-8"?>
                <e:Envelope
xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
                    <e:Body>
                        <method-name>
                            <aRequest>
                            	... 	  
                            </aRequesty>
                        </method-name>
                    </e:Body>
                </e:Envelope>
                
Is this idea correct?

The other idea we had was to implement a "lightweight component pojo".
If we use such a lw-pojo and want to call its different operations, do
we have to use the onMessageExchange method of the lw-pojo? For instance,
we could extract the operation from the MessageExchange and invoke the
method/operation in our onMessageExchange-implementation using
reflection from this lw-pojo.

Are there any other ways to invoke specific methods/operations from an
endpoint? Are there any examples of how to fulfil this task ? 



-- 
View this message in context: http://www.nabble.com/JSR181-Endpoint-question-tf2259840.html#a6269257
Sent from the ServiceMix - User forum at Nabble.com.


Re: JSR181 Endpoint question

Posted by Guillaume Nodet <gn...@gmail.com>.
On 9/12/06, Seguy <ca...@gmail.com> wrote:
>
>
> Hi,
>
> My team is involved in a project that has chosen Servicemix as our ESB
> platform. We gonna develop our components as endpoints and we want to
> invoke different methods/operations for each endpoint. At a first
> glance, it seems that the JSR181 component could fit to our idea.
>
> It seems that the invocation of a specific method is done by the
> JSR181 endpoint via a soap message send to XFire:




<?xml version="1.0" encoding="UTF-8"?>
>                 <e:Envelope
> xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>                     <e:Body>
>                         <method-name>
>                             <aRequest>
>                                 ...
>                             </aRequesty>
>                         </method-name>
>                     </e:Body>
>                 </e:Envelope>
>
> Is this idea correct?


No.
The jsr181 component expect a non-soap message.
Soap is handled by BCs (servicemix-http for example).


The other idea we had was to implement a "lightweight component pojo".
> If we use such a lw-pojo and want to call its different operations, do
> we have to use the onMessageExchange method of the lw-pojo? For instance,
> we could extract the operation from the MessageExchange and invoke the
> method/operation in our onMessageExchange-implementation using
> reflection from this lw-pojo.


Yeah, if the jsr181 component does not fit your needs, this is currently
the easiest path to go.   You could also take a look at the
org.apache.servicemix.components.reflection package, but these components
do not use the xml payload, so it may be difficult to bridge with other
components.

Are there any other ways to invoke specific methods/operations from an
> endpoint? Are there any examples of how to fulfil this task ?


The jsr181 component also has a proxy, but it currently requires
a WSDL for the target endpoint, so it may be of a limited use currently.

--
> View this message in context:
> http://www.nabble.com/JSR181-Endpoint-question-tf2259840.html#a6269257
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet