You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by navigator09 <ga...@gmail.com> on 2008/12/11 11:40:28 UTC

Expose jbi endpoint defined in using http component

Hi,

 I am trying to control message routing using camel.I have defined a jbi end
point in the camel router
 and want to expose it as a http end point using http component.


   I have tried the following configuration


   In http component's xbean.xml

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:poller="http://foo.bar.org">
   <http:endpoint service="poller:MyService" 
                 endpoint="MyEndpoint"
                 role="consumer" 
                 locationURI="http://0.0.0.0:8192/jobsubmissionandpoll/"
                 soap="true" />  

and the camel route containes the following configuration

  from("jbi:endpoint:http://foo.bar.org/MyService/MyEndpoint")
    	 .to("log:jms")

  However I get the following error when I try to send a message to the
configuration.

<soap:Reason>
            <soap:Text xml:lang="en">javax.jbi.messaging.MessagingException:
Could not find route for exchange: InOut[
  id: ID:10.20.3.92-11e252e3a72-10:1
  status: Active
  role: provider
  service: {http://foo.bar.org}MyService
  operation: hello
  in: &lt;?xml version="1.0" encoding="UTF-8"?>&lt;hello
xmlns:grid="http://www.icenigrid.org/service/gridsam"
xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">test&lt;/hello>
] for service: {http://foo.bar.org}MyService and interface: null</soap:Text>
         </soap:Reason>


  How do I solve the problem? Is it possible to have a http listener in
camel route directly using mina and invoke it externally without using the
HTTP component?

Regards,
Ganesh
-- 
View this message in context: http://www.nabble.com/Expose-jbi-endpoint-defined-in-using-http-component-tp20953104p20953104.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Expose jbi endpoint defined in using http component

Posted by Guillaume Nodet <gn...@gmail.com>.
When using camel from("jbi:xxx"), camel will actually create a JBI
endpoint with the specified parameters in the URI.
What you need to do is to configure the http endpoint to target the
endpoint create by camel using the targetService attribute.
Make sure both match.

On Thu, Dec 11, 2008 at 11:40 AM, navigator09 <ga...@gmail.com> wrote:
>
> Hi,
>
>  I am trying to control message routing using camel.I have defined a jbi end
> point in the camel router
>  and want to expose it as a http end point using http component.
>
>
>   I have tried the following configuration
>
>
>   In http component's xbean.xml
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
> xmlns:poller="http://foo.bar.org">
>   <http:endpoint service="poller:MyService"
>                 endpoint="MyEndpoint"
>                 role="consumer"
>                 locationURI="http://0.0.0.0:8192/jobsubmissionandpoll/"
>                 soap="true" />
>
> and the camel route containes the following configuration
>
>  from("jbi:endpoint:http://foo.bar.org/MyService/MyEndpoint")
>         .to("log:jms")
>
>  However I get the following error when I try to send a message to the
> configuration.
>
> <soap:Reason>
>            <soap:Text xml:lang="en">javax.jbi.messaging.MessagingException:
> Could not find route for exchange: InOut[
>  id: ID:10.20.3.92-11e252e3a72-10:1
>  status: Active
>  role: provider
>  service: {http://foo.bar.org}MyService
>  operation: hello
>  in: &lt;?xml version="1.0" encoding="UTF-8"?>&lt;hello
> xmlns:grid="http://www.icenigrid.org/service/gridsam"
> xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl"
> xmlns:soap="http://www.w3.org/2003/05/soap-envelope">test&lt;/hello>
> ] for service: {http://foo.bar.org}MyService and interface: null</soap:Text>
>         </soap:Reason>
>
>
>  How do I solve the problem? Is it possible to have a http listener in
> camel route directly using mina and invoke it externally without using the
> HTTP component?
>
> Regards,
> Ganesh
> --
> View this message in context: http://www.nabble.com/Expose-jbi-endpoint-defined-in-using-http-component-tp20953104p20953104.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com