我正在使用 Camel 和 CXF 开发 Web 服务,并使用“代码优先”方法。对于具有单个参数的方法,一切正常。然而,具有多个参数的方法只接收第一个参数,其他方法解析为空值。不会抛出异常。
这是我的路线:
<route>
<from uri="cxf:bean:serverEndPoint" />
<log message=">>> data is : ${body}"/>
<choice>
<when>
<simple>${in.header.operationName} == 'doSomething'</simple>
<to uri="bean:TestWSBean?method=doSomething"/>
</when>
...
</route>
服务器端点定义如下:
<cxf:cxfEndpoint id="serverEndPoint"
address="http://localhost:9000/casServer/"
serviceClass="com.test.iface.TestWebService">
<cxf:inInterceptors>
<ref bean="loggingInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="loggingOutInterceptor"/>
</cxf:outInterceptors>
</cxf:cxfEndpoint>
以及实现 bean 本身:
@WebService
public interface TestWebService {
public String doSomething(String one, String two);
}
我的问题很基本,应该怎么做才能发送多个参数?