Hi Evgeny,
My comments are in the mail.
pevgen wrote:
Hi.
I try to use CxfEndpoint and I have 2 questions :
1. The class, which I use in parameter "serviceClass" - is it stub only ?
(like interface ?) Can i write buisness logic in this class ?
The serviceClass could be SEI or the implementor class, CXF will build
the service model[1] with this class if you do not specify the WSDL URL.
[1]
http://cwiki.apache.org/CXF20DOC/cxf-architecture.html#CXFArchitecture-TheServiceModel
2. How can i return the response to client ? When i try to call my ws, then
i get empty answer.
I just checked your configure file, you need put the response in the
ru.transsys.camel.MyProcessor's process method.
public void process(Exchange exchange) throws Exception {
Message request = exchange.getIn();
// handler the request , create the response
exchange.getOut().setBody(response);
}
Is's part of my config :
<bean id="proc" class="ru.transsys.camel.MyProcessor"/>
<cxf:cxfEndpoint id="routerEndpoint"
address="http://localhost:9003/CamelContext/RouterPort"
serviceClass="ru.transsys.camel.EchoImpl"/>
<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="cxf://bean:routerEndpoint"/>
<process ref="proc"/>
</route>
</camelContext>
Thanks
Evgeny
Willem