Tag: cxfrs

如何使用Camel将本地服务的Rest请求路由到远程请求

我试图从一个cxfrest服务路由rest请求到另一个。 我看了一下http://camel.apache.org/cxfrs.html ,这有助于理解过程的一部分。 我在remoteService调用级别有一个classCastException。 我究竟做错了什么 ? <cxf:rsServer id="exposedService" address="/exposed/" serviceClass="com.example.project.ExposedService" /> <!– using different classes since we are not just proxying –> <cxf:rsClient id="remoteService" address="http://remote.com/service" serviceClass="com.example.project.RemoteService" /> <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <package>com.example.project</package> </camel:camelContext> 服务类别: @Path("/myservice") public class ExposedService { @POST @Consumes("application/xml") public void postResource(javax.xml.transform.Source resource) { // source : not using jaxb just plain xml // only […]