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

发布于 2024-11-07 00:59:12 字数 11061 浏览 2 评论 0原文

我正在尝试将休息请求从 CXF 休息服务路由到另一个。我查看了 http://camel.apache.org/cxfrs.html 这有帮助了解部分流程。我在远程服务调用级别有一个 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 serves to configure the endpoint (?)    
    }               
}


public class RemoteService {

    @POST
        @Consumes("application/xml")
    public void postResource(javax.xml.transform.Source resource) {
            // source : not using jaxb just plain xml
        // only serves to configure the endpoint (?)    
    }               
}

RouteBuilder:

public class MyRouteBuilder extends RouteBuilder {

public void configure() { 
    from("cxfrs://bean://exposedService")
    .process(...) // a few System.out.println's
    .to("cxfrs://bean://remoteService")
    ;   
}
}

Stacktrace:

| ERROR | qtp-2045010446-1 | DefaultErrorHandler              | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for exchangeId: ID-Lab-local-52879-1305561896560-7-2. Exhausted after delivery attempt: 1 caught: java.lang.ClassCastException
java.lang.ClassCastException
        at java.lang.Class.cast(Class.java:2990)[:1.6.0_24]
        at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:329)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProducer.java:147)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:77)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.syncInvoke(CxfRsInvoker.java:134)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:68)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:153)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:87)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[116:org.apache.cxf.bundle:2.3.2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_24]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_24]
        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiDestination.doMessage(OsgiDestination.java:79)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiServletController.invokeDestination(OsgiServletController.java:336)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiServletController.invoke(OsgiServletController.java:108)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiServlet.invoke(OsgiServlet.java:53)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.SpringOsgiServlet.invoke(SpringOsgiServlet.java:48)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)[116:org.apache.cxf.bundle:2.3.2]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)[93:org.apache.geronimo.specs.geronimo-servlet_3.0_spec:1.0]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)[116:org.apache.cxf.bundle:2.3.2]
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)[133:org.ops4j.pax.web.pax-web-jetty:0.7.4]
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111)[133:org.ops4j.pax.web.pax-web-jetty:0.7.4]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:68)[133:org.ops4j.pax.web.pax-web-jetty:0.7.4]
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.Server.handle(Server.java:326)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]

I am trying to route a rest request from a cxf rest service to another. I have had a look at http://camel.apache.org/cxfrs.html which helped understand part of the process. I have a classCastException at the level of the remoteService Invocation.

What am I doing wrong ?

<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>

Service Classes:

@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 serves to configure the endpoint (?)    
    }               
}


public class RemoteService {

    @POST
        @Consumes("application/xml")
    public void postResource(javax.xml.transform.Source resource) {
            // source : not using jaxb just plain xml
        // only serves to configure the endpoint (?)    
    }               
}

RouteBuilder:

public class MyRouteBuilder extends RouteBuilder {

public void configure() { 
    from("cxfrs://bean://exposedService")
    .process(...) // a few System.out.println's
    .to("cxfrs://bean://remoteService")
    ;   
}
}

Stacktrace:

| ERROR | qtp-2045010446-1 | DefaultErrorHandler              | 68 - org.apache.camel.camel-core - 2.6.0 | Failed delivery for exchangeId: ID-Lab-local-52879-1305561896560-7-2. Exhausted after delivery attempt: 1 caught: java.lang.ClassCastException
java.lang.ClassCastException
        at java.lang.Class.cast(Class.java:2990)[:1.6.0_24]
        at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:329)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProducer.java:147)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:77)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:174)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:102)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)[68:org.apache.camel.camel-core:2.6.0]
        at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.syncInvoke(CxfRsInvoker.java:134)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.camel.component.cxf.jaxrs.CxfRsInvoker.performInvocation(CxfRsInvoker.java:68)[118:org.apache.camel.camel-cxf:2.6.0]
        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:153)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:87)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[116:org.apache.cxf.bundle:2.3.2]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_24]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_24]
        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiDestination.doMessage(OsgiDestination.java:79)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiServletController.invokeDestination(OsgiServletController.java:336)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiServletController.invoke(OsgiServletController.java:108)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.OsgiServlet.invoke(OsgiServlet.java:53)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.http_osgi.SpringOsgiServlet.invoke(SpringOsgiServlet.java:48)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)[116:org.apache.cxf.bundle:2.3.2]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)[116:org.apache.cxf.bundle:2.3.2]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)[93:org.apache.geronimo.specs.geronimo-servlet_3.0_spec:1.0]
        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)[116:org.apache.cxf.bundle:2.3.2]
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)[133:org.ops4j.pax.web.pax-web-jetty:0.7.4]
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.handle(HttpServiceContext.java:111)[133:org.ops4j.pax.web.pax-web-jetty:0.7.4]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:68)[133:org.ops4j.pax.web.pax-web-jetty:0.7.4]
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.Server.handle(Server.java:326)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)[94:org.apache.servicemix.bundles.jetty:6.1.25.1]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心是晴朗的。 2024-11-14 00:59:12

这里有一个几乎做同样事情的工作示例...

http://camel.apache.org/cxf -proxy-example.html

以此开始,然后逐一删除您的更改并查看它在哪里中断......

there is a working example of doing nearly the same thing here...

http://camel.apache.org/cxf-proxy-example.html

start with this, then drop your changes in one-by-one and see where it breaks...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文