You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "rrino Gazeta.pl" <rr...@gazeta.pl> on 2011/07/19 14:56:52 UTC
what is the bast way to start camel route from jbi endpoint (webservice)?
Hi
I want to start my old route which was started by timer
from("timer://tutorial?fixedRate=true&delay=3000&period=20000")
.setBody(constant(msg))
.to("jbi:endpoint:urn:com:example:prototype:jms:provider");
with webservice invocation eg ;
from("jbi:endpoint:http://localhost:8889/MyService")
.to("jbi:endpoint:urn:pl:swmind:robust:prototype:jms:provider");
On the camel jbi component website ( http://camel.apache.org/jbi.html )i can
read that it will "Automatically exposes a new endpoint to the bus, where
the service QName is {http://foo.bar.org}MyService and the endpoint name is
MyEndpoint (see URI-format <http://camel.apache.org/jbi.html#JBI-URIformat>)."
What I should do to achieve it? "MyService" will provide a content for a
camel so maybe should it be a usual cxf-bc consumer?
regards
rafal
Re: what is the bast way to start camel route from jbi endpoint (webservice)?
Posted by Freeman Fang <fr...@gmail.com>.
On 2011-7-19, at 下午8:56, rrino Gazeta.pl wrote:
> Hi
>
> I want to start my old route which was started by timer
>
> from("timer://tutorial?fixedRate=true&delay=3000&period=20000")
> .setBody(constant(msg))
> .to("jbi:endpoint:urn:com:example:prototype:jms:provider");
>
>
> with webservice invocation eg ;
>
> from("jbi:endpoint:http://localhost:8889/MyService")
> .to("jbi:endpoint:urn:pl:swmind:robust:prototype:jms:provider
> ");
>
>
> On the camel jbi component website ( http://camel.apache.org/
> jbi.html )i can
> read that it will "Automatically exposes a new endpoint to the bus,
> where
> the service QName is {http://foo.bar.org}MyService and the endpoint
> name is
> MyEndpoint (see URI-format <http://camel.apache.org/jbi.html#JBI-URIformat
> >)."
>
>
> What I should do to achieve it? "MyService" will provide a content
> for a
> camel so maybe should it be a usual cxf-bc consumer?
Hi,
The camel-jbi component just provide a bridge that jbi endpoint can
talk to any camel endpoint.
A scenario could be
cxf bc consumer ====>
from(jbi:endpoint...).
...
any camel dsl/endpoint here
...
to(jbi:endpoint)======>
cxf bc provider.
The from("jbi:endpoint...) expose a new jbi endpoint to the jbi bus,
as a jbi provider, it can't be a usual cxf-bc consumer, but can be the
target of cxf-bc consumer.
Freeman
>
>
> regards
>
> rafal
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: what is the bast way to start camel route from jbi endpoint (webservice)?
Posted by Łukasz Dywicki <lu...@code-house.org>.
If I understand correctly part from("jbi:endpoint") causes registration of endpoint in the bus. It doesn't have a external interface, so the "http://localhost:8889/MyService" points only to namespace and endpoint identifier, not to jetty port or something like that. If you wish expose HTTP endpoint and forward inbound queries to NMR use following structure:
from("jetty:...").to("jbi:endpoint:....");
or use these attributes in cxf-bc
<beans xmlns:prefix="http://localhost:8889/" ...>
<cxf-bc:consumer targetService="prefix:MyService" />
Pozdrawiam i życzę powodzenia z SMX,
Łukasz :)
> Hi
>
> I want to start my old route which was started by timer
>
> from("timer://tutorial?fixedRate=true&delay=3000&period=20000")
> .setBody(constant(msg))
> .to("jbi:endpoint:urn:com:example:prototype:jms:provider");
>
>
> with webservice invocation eg ;
>
> from("jbi:endpoint:http://localhost:8889/MyService")
> .to("jbi:endpoint:urn:pl:swmind:robust:prototype:jms:provider");
>
>
> On the camel jbi component website ( http://camel.apache.org/jbi.html )i can
> read that it will "Automatically exposes a new endpoint to the bus, where
> the service QName is {http://foo.bar.org}MyService and the endpoint name is
> MyEndpoint (see URI-format <http://camel.apache.org/jbi.html#JBI-URIformat>)."
>
>
> What I should do to achieve it? "MyService" will provide a content for a
> camel so maybe should it be a usual cxf-bc consumer?
>
>
> regards
>
> rafal