You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Kristian Köhler <Kr...@dmc.de> on 2007/10/18 08:02:01 UTC

Possible Solution to a camel serviceengine problem or only a bad workaround??

Hi all

I found a solution for my problem regarding the routing problem yesterday (http://www.nabble.com/How-to-route-a-MessageExchange-using-camel-to-ode-tf4641042s12049.html#a13255218). I wasn't able to route a message coming over HTTP Binding through camel to ODE service engine. I specified a routing rule like this:

--- 8< ---

String fromUri = "jbi:endpoint:http://gaswerk.sourceforge.net/soa-stack/enpoint";
String toUri = "jbi:endpoint:http://gaswerk.sourceforge.net/soa-stack/sample/bpel/SampleBPELProcess/SampleBPELProcessPort?mep=in-out";
    	
from(fromUri).to(toUri);

--- 8< ---

This results in the following error in the ODE service engine: "Operation not
found". If I route the message directly from HTTP binding to the ODE service
engine everything works fine.

I haven't found a syntax for specifying a operation for an endpoint within the
routing expression shown above. (Makes this sense at all??)

After some investigation I found in the camel service engine (JbiExchange.java)
a property "jbi.operation" which is set for the camel exchange (line 151) but I
couldn't figure out where it is used. 

I'm absolutly not sure about my next step. ;-) 

In the JbiBinding a new JBI Message Exchange is created to route the message
back to the NMR (createJbiMessageExchange). I added some lines to set the
operation on the resulting MessageExchange (see attached patch). 

Now my sample works fine but as mentioned before I'm not sure if this is
correct. Does this makes sense??? Is it a bug or a bad workaround for my
problem?? 

The question to me is: Is it correct to 'loose' the information about the
operation?? Do I have to add this information within my routing rule reading the
property (how?)?

Thanks!

Kristian

-- 
Kristian Köhler
software architect
dmc digital media center GmbH
Rommelstraße 11
70376 Stuttgart (Germany)
Telefon: +49 711 601747-434
Telefax: +49 711 601747-141
Internet: www.dmc.de

Handelsregister: AG Stuttgart HRB 18974
Geschäftsführer: Andreas Magg, Daniel Rebhorn, Andreas Schwend

---------------------------------------------

Bessere Gespräche, besseres E-Business.

Willkommen auf dem Deutschen Versandhandelskongress 2007.
Besuchen Sie uns in der dmc Lounge im Foyer 1. Stock. 

Wir sehen uns. Mehr Infos: www.dmc.de/lounge

AW: Possible Solution to a camel serviceengine problem or only a bad workaround??

Posted by Kristian Köhler <Kr...@dmc.de>.
> I also meant that if there is not, it should be added :-)

Ok... ;-)

AW: Possible Solution to a camel serviceengine problem or only a bad workaround??

Posted by Kristian Köhler <Kr...@dmc.de>.
please also see:
https://issues.apache.org/activemq/browse/SM-1111

this is the summary ;-)

> -----Ursprüngliche Nachricht-----
> Von: Guillaume Nodet [mailto:gnodet@gmail.com]
> Gesendet: Donnerstag, 18. Oktober 2007 13:19
> An: servicemix-dev@geronimo.apache.org
> Betreff: Re: Possible Solution to a camel serviceengine 
> problem or only
> a bad workaround??
> 
> 
> On 10/18/07, Kristian Köhler <Kr...@dmc.de> wrote:
> > Hi
> >
> > > Anyway, I think you're on the right track.  There's no 
> reason why the
> > > camel SE would set the jbi.operation property when going 
> from jbi to
> > > camel, but not use it when going from camel to jbi.  In 
> addition, we
> > > could make the operation also configurable on the endpoint (to be
> > > consistent with the mep), so I think we need to add:
> > >     jbi:endpoint:xxxx?operation=yyyy
> >
> > Good to hear that I'm not totaly wrong ;-)
> > I will also add the second option to the patch and raise a 
> jira issue.
> >
> > > Also, I can't recall if camel provides a way to change 
> the mep easily:
> > > I know it is a loosely defined notion in camel, but still, there
> > > should be an accessor in the DSL I suppose.
> 
> I also meant that if there is not, it should be added :-)
> 
> >
> > I'm searching...
> >
> > Kristian
> >
> >
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 

Re: Possible Solution to a camel serviceengine problem or only a bad workaround??

Posted by Guillaume Nodet <gn...@gmail.com>.
On 10/18/07, Kristian Köhler <Kr...@dmc.de> wrote:
> Hi
>
> > Anyway, I think you're on the right track.  There's no reason why the
> > camel SE would set the jbi.operation property when going from jbi to
> > camel, but not use it when going from camel to jbi.  In addition, we
> > could make the operation also configurable on the endpoint (to be
> > consistent with the mep), so I think we need to add:
> >     jbi:endpoint:xxxx?operation=yyyy
>
> Good to hear that I'm not totaly wrong ;-)
> I will also add the second option to the patch and raise a jira issue.
>
> > Also, I can't recall if camel provides a way to change the mep easily:
> > I know it is a loosely defined notion in camel, but still, there
> > should be an accessor in the DSL I suppose.

I also meant that if there is not, it should be added :-)

>
> I'm searching...
>
> Kristian
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: Possible Solution to a camel serviceengine problem or only a bad workaround??

Posted by James Strachan <ja...@gmail.com>.
On 18/10/2007, Guillaume Nodet <gn...@gmail.com> wrote:
> The attachment was removed from your mail i suppose.
> Maybe just raise a jira and attach it there.
>
> Anyway, I think you're on the right track.  There's no reason why the
> camel SE would set the jbi.operation property when going from jbi to
> camel, but not use it when going from camel to jbi.  In addition, we
> could make the operation also configurable on the endpoint (to be
> consistent with the mep), so I think we need to add:
>     jbi:endpoint:xxxx?operation=yyyy
>
> Also, I can't recall if camel provides a way to change the mep easily:
> I know it is a loosely defined notion in camel, but still, there
> should be an accessor in the DSL I suppose.

Yeah - the setPattern() is available on the camel Exchange; so it
should be easy to change the MEP inside a component or in a processor
or even adding it into the DSL

-- 
James
-------
http://macstrac.blogspot.com/

Open Source SOA
http://open.iona.com

AW: Possible Solution to a camel serviceengine problem or only a bad workaround??

Posted by Kristian Köhler <Kr...@dmc.de>.
Hi
 
> Anyway, I think you're on the right track.  There's no reason why the
> camel SE would set the jbi.operation property when going from jbi to
> camel, but not use it when going from camel to jbi.  In addition, we
> could make the operation also configurable on the endpoint (to be
> consistent with the mep), so I think we need to add:
>     jbi:endpoint:xxxx?operation=yyyy

Good to hear that I'm not totaly wrong ;-)
I will also add the second option to the patch and raise a jira issue. 

> Also, I can't recall if camel provides a way to change the mep easily:
> I know it is a loosely defined notion in camel, but still, there
> should be an accessor in the DSL I suppose.

I'm searching...

Kristian


Re: Possible Solution to a camel serviceengine problem or only a bad workaround??

Posted by Guillaume Nodet <gn...@gmail.com>.
The attachment was removed from your mail i suppose.
Maybe just raise a jira and attach it there.

Anyway, I think you're on the right track.  There's no reason why the
camel SE would set the jbi.operation property when going from jbi to
camel, but not use it when going from camel to jbi.  In addition, we
could make the operation also configurable on the endpoint (to be
consistent with the mep), so I think we need to add:
    jbi:endpoint:xxxx?operation=yyyy

Also, I can't recall if camel provides a way to change the mep easily:
I know it is a loosely defined notion in camel, but still, there
should be an accessor in the DSL I suppose.

On 10/18/07, Kristian Köhler <Kr...@dmc.de> wrote:
> Hi all
>
> I found a solution for my problem regarding the routing problem yesterday (http://www.nabble.com/How-to-route-a-MessageExchange-using-camel-to-ode-tf4641042s12049.html#a13255218). I wasn't able to route a message coming over HTTP Binding through camel to ODE service engine. I specified a routing rule like this:
>
> --- 8< ---
>
> String fromUri = "jbi:endpoint:http://gaswerk.sourceforge.net/soa-stack/enpoint";
> String toUri = "jbi:endpoint:http://gaswerk.sourceforge.net/soa-stack/sample/bpel/SampleBPELProcess/SampleBPELProcessPort?mep=in-out";
>
> from(fromUri).to(toUri);
>
> --- 8< ---
>
> This results in the following error in the ODE service engine: "Operation not
> found". If I route the message directly from HTTP binding to the ODE service
> engine everything works fine.
>
> I haven't found a syntax for specifying a operation for an endpoint within the
> routing expression shown above. (Makes this sense at all??)
>
> After some investigation I found in the camel service engine (JbiExchange.java)
> a property "jbi.operation" which is set for the camel exchange (line 151) but I
> couldn't figure out where it is used.
>
> I'm absolutly not sure about my next step. ;-)
>
> In the JbiBinding a new JBI Message Exchange is created to route the message
> back to the NMR (createJbiMessageExchange). I added some lines to set the
> operation on the resulting MessageExchange (see attached patch).
>
> Now my sample works fine but as mentioned before I'm not sure if this is
> correct. Does this makes sense??? Is it a bug or a bad workaround for my
> problem??
>
> The question to me is: Is it correct to 'loose' the information about the
> operation?? Do I have to add this information within my routing rule reading the
> property (how?)?
>
> Thanks!
>
> Kristian
>
> --
> Kristian Köhler
> software architect
> dmc digital media center GmbH
> Rommelstraße 11
> 70376 Stuttgart (Germany)
> Telefon: +49 711 601747-434
> Telefax: +49 711 601747-141
> Internet: www.dmc.de
>
> Handelsregister: AG Stuttgart HRB 18974
> Geschäftsführer: Andreas Magg, Daniel Rebhorn, Andreas Schwend
>
> ---------------------------------------------
>
> Bessere Gespräche, besseres E-Business.
>
> Willkommen auf dem Deutschen Versandhandelskongress 2007.
> Besuchen Sie uns in der dmc Lounge im Foyer 1. Stock.
>
> Wir sehen uns. Mehr Infos: www.dmc.de/lounge
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/