Can I route my messages to the correct java method?
If you mean the specific method of the bean you have manually created, then yes.
For e.g.:
Create custom bean:
public class CustomProcessor {
public void processSomething(Exchange exchange) {
Something smth = exchange.getIn().getBody(Something.class); //Your message's body
}
}
Using Spring
create a camel configuration something like this:
<bean id="processor" class="your.custom.CustomProcessor"/>
<camel:camelContext trace="true" id="camelContext" >
<camel:route id="camelRoute">
<camel:from uri="cxf:bean:yourWebServiceListenerEndpoint?dataFormat=POJO&synchronous=true" />
<camel:choice>
<camel:when>
<camel:simple>${headers.operationName} == 'DoSomething'</camel:simple>
<camel:bean ref="processor" method="processSomething"/>
</camel:when>
</camel:choice>
<camel:to uri="cxf:bean:yourWebServiceTargetEndpoint"/>
</camel:route>
</camel:camelContext>
Depending on the operation name camel will route the message to the corresponding processor. You can route your message in Camel in anyway you like. You just have to think of how. From your question this is as much as I can give. If you would update it to be more specific maybe I could offer some more help.
See also: