CamelとCXFを使用してWebサービスを開発しており、「コードファースト」アプローチを使用しています。単一のパラメーターを持つメソッドの場合、すべてが正常に機能します。ただし、複数のパラメーターを持つメソッドは最初のパラメーターのみを受け取り、他のパラメーターは null に解決されます。例外はスローされません。
これが私のルートです:
<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);
}
私の質問は非常に基本的なものですが、複数のパラメーターを送信できるようにするにはどうすればよいですか?