Apache Tomcat での camel cxf-rs エンドポイントの実装に関して質問があります。
関数を実行するためにラクダに cxf-rs エンドポイントを実装しました。私が基本的に行ったことは、cxf-rs エンドポイントから、何らかの機能を持つ Java クラスである Bean へのルートを作成することです。
したがって、cxf-rs エンドポイントの URL にアクセスすると、クラスのコードが実行されます。
私のコードは次のようになります。エンドポイントは、
<cxf:rsServer id="rsServer" address="http://localhost:8080/integration/services/rest"
serviceClass="com........BeginFunction"/>
BeginFunction.java:
@Path("/mapper/")
public class BeginFunction {
@Context
private UriInfo uriInfo;
public BeginFunction() {
}
@GET
public Response getMapper() {
return Response.status(200).entity("getMapper is called").build();
}
}
ルートは次のとおりです。
<route streamCache="true">
<from uri="cxfrs:bean:rsServer" />
<to uri="myBean"/>
</route>
これで、jetty-jars が含まれている場合にのみ、Tomcat で実装が正常に機能するようになりました!! 私の懸念は、Tomcat 内に別のコンテナーを入れたくないということです。桟橋のjarファイルを含めずにTomcatに実装されたエンドポイントを取得する方法はありますか.
現在、camel 2.11.1、Apache Tomcat 7、および Jetty-bundles-repository-7.6.12.v20130726 を実行しています。
ありがとう。