apache camel - set endpoint of an OSGI Blueprint file in ServiceMix -
I know that using the blue print syntax, I can define camel routes in a single XML file. If I transmit one of the files in the "Deployment" folder of the service file, then it automatically becomes an OSGI bundle. My question is, can I make an end point of this new bundle accessible from outside Can i
I want to do something like this:
blue_route1.xml
& lt; Template & gt; & Lt; CamelContext & gt; & Lt; Route & gt; & Lt; Uri = "http: my_servicemix: 8181 / blue_route1_endpoint" /> & Lt; From Yuri = "JT: http: // server1" /> & Lt; / Route & gt; & Lt; / CamelContext & gt; & Lt; / Template & gt; blue_route1 Once created, an OSGI bundle becomes, but where should I define "blue_route1_endpoint"? Is this possible?
[UPDATE]
Hello, I want to send messages to external WS blue_route1_endpoint , where blue_route1 bundle , Will redirect the messages according to the camel routes, without the need to create a new WS " Blue_RTE1 " to be deployed in Servicemix,
______________________ | ____________ | External -> (blue_route1_endpoint) == | == - & gt; | Blue_route1 | - | - & gt; (Http: // server1) ws. | ___________ | | | ____________________ | ServiceMix
found this! I did not find that it is so easy to listen to servix on a port, I just have to specify the last point using the camel-jetty component. So, to answer my question, I solved this way:
Install camel-jetty components in the servicemix
Features: Install camel-jetties < / Code> Write a camel-route with blueprints in the Blue-Route 1.xml file
& Lt; / Route & gt; & Lt; Route & gt; & Lt; Uri = "From Jettie: http: //0.0.0.0: 6969 / sp_role? MatchOnUriPrefix = true" /> & Lt; SetHeader headerName = "content-type" & gt; & Lt; Groovy & gt; "Text / xml; charset = UTF-8" & lt; / Groovy & gt; & Lt; / SetHeader & gt; & Lt; From Yuri = "http: // server1" /> & Lt; / Route & gt; & Lt; / CamelContext & gt; & Lt; / Template & gt; I used a random port 8181 to listen to ... but I can select every number, the servicemix will automatically start a jetty component, that port / closing Will hear and consume at the point.
Comments
Post a Comment