L.S.,
There are two ways to handle this with servicemix-camel.
Option 1: the JBI operation is conveyed in the Camel Exchange in an
exchange header called 'JbiOperation' (value of the
JbiBinding.OPERATION constant) so you could override that header value
in your route -- the value should be your operation QName. In Java
code, it would look like this
exchange.setProperty(JbiBinding.OPERATION, new
QName("http://example.org", "greet"))
Option 2: the easier solution would be to just append the target
operation to the endpoint URI, e.g. you could use <to
uri="jbi:service:http://example.org/greetingService?operation={http://example.org}greet"/>
to override the incoming operation while sending the Exchange to the
greetService endpoint.
Regards,
Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
On 28 June 2010 12:18, Anto <[email protected]> wrote:
>
> Hi,
>
> When routing from ServiceMix CXF-BC consumer to ServiceMix CXF-BC
> provider, need to call a different operation of CXF provider web service.
> The application uses ServiceMix and Camel JBI component. Camel is used for
> routing purpose only. The route is
>
> CXF BC consumer ----> Camel ----> CXF BC provider
>
> For example
>
> operation: {http://example.org}hello
>
> changed to
>
> operation: {http://example.org}greet
>
> I tried to set operation as a header in camel route but is not working.
>
> <route>
> <from uri="jbi:service:http://example.org/helloRouteBuilder"/>
> <setHeader headerName="operationName">
> <constant>greet</constant>
> </setHeader>
> <to uri="jbi:service:http://example.org/greetingService"/>
> </route>
>
> I know that this syntax is for Camel CXF endpoints. Will it work for
> ServiceMix CXF components?
>
> Anto
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Changing-operation-in-ServiceMix-CXF-consumer-provider-tp511639p511639.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>