Apache camel org.apache.camel.cameleExecutionException:在exchange上执行时发生异常:exchange[ID-02777-NB-1619037740507-0-1]

Apache camel org.apache.camel.cameleExecutionException:在exchange上执行时发生异常:exchange[ID-02777-NB-1619037740507-0-1],apache-camel,camel-cxf,Apache Camel,Camel Cxf,我正在培训如何在ApacheCamel中实现一个soap代理(从http到https),如果我收到一个soap方法,我必须对它进行签名(使用camel cxf的binarysecuritytoken)并发送它 我有一个实现,我使用https服务器,但我的问题是每次我训练签名soap尺寸时都会出现以下错误: , CamelHttpUri=/mockDiagnosticService, CamelHttpUrl=http://localhost:8080/mockDiagnosticService,

我正在培训如何在ApacheCamel中实现一个soap代理(从http到https),如果我收到一个soap方法,我必须对它进行签名(使用camel cxf的binarysecuritytoken)并发送它

我有一个实现,我使用https服务器,但我的问题是每次我训练签名soap尺寸时都会出现以下错误:

, CamelHttpUri=/mockDiagnosticService, CamelHttpUrl=http://localhost:8080/mockDiagnosticService, CamelServletContextPath=/mockDiagnosticService, Connection=keep-alive, Content-Length=472, Content-Type=text/xml;charset=UTF-8, Host=localhost:8080, SOAPAction="http://diagnostic.ws.mcrewards.mastercard.com/doEcho", User-Agent=Apache-HttpClient/4.1.1 (java 1.5)}, BodyType:org.apache.camel.converter.stream.InputStreamCache
2021-04-21 17:42:31,413 ERROR org.apache.camel.processor.DefaultErrorHandler                                              //// ID-02777-NB-1619037740507-0-1            Failed delivery for (MessageId: ID-02777-NB-1619037740507-0-2 on ExchangeId: ID-02777-NB-1619037740507-0-1). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-02777-NB-1619037740507-0-1]

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
[RoutegetPointDetai] [RoutegetPointDetai] [jetty:http://0.0.0.0:8080/mockDiagnosticService                               ] [        48]
[RoutegetPointDetai] [to12              ] [cxf:bean:getPointDetails?dataFormat=MESSAGE                                   ] [        14]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[ID-02777-NB-1619037740507-0-1]
        at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1842)
        at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:385)
        at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:141)
        at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
        at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:181)
        at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
        at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
        at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
        at org.apache.camel.component.jetty.CamelContinuationServlet.doService(CamelContinuationServlet.java:220)
        at org.apache.camel.http.common.CamelServlet.service(CamelServlet.java:79)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
        at org.eclipse.jetty.servlets.MultiPartFilter.doFilter(MultiPartFilter.java:150)
        at org.apache.camel.component.jetty.CamelFilterWrapper.doFilter(CamelFilterWrapper.java:43)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1340)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1242)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:503)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.AbstractMethodError: null
        at org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:249)
        at org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:223)
        at org.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:214)
        at org.apache.cxf.phase.PhaseChainCache.getChain(PhaseChainCache.java:89)
        at org.apache.cxf.phase.PhaseChainCache.get(PhaseChainCache.java:71)
        at org.apache.cxf.endpoint.ClientImpl.setupInterceptorChain(ClientImpl.java:987)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:499)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:433)
        at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:133)
        ... 33 common frames omitted
以下是我的植入:

<cxf:cxfEndpoint id="getPointDetails"  address="http://localhost:8089/mockDiagnosticService"
        serviceClass="com.mastercard.mcrewards.ws.diagnostic.DiagnosticService">
    
        <cxf:properties>
            <entry key="mtom-enabled" value="true"/>
            <entry key="dataFormat" value="MESSAGE"/>   
        </cxf:properties>
        <cxf:outInterceptors>
        
            <bean id="OutWssInterceptor" class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
                <constructor-arg>
                    <map>
                        <entry key="action" value="Signature Timestamp"/>
                        <entry key="signaturePropFile" value="file:spring/client_sign.properties"/>
                        <entry key="signatureKeyIdentifier" value="DirectReference"/>
                   </map>
                </constructor-arg>
            </bean>
            
        </cxf:outInterceptors>
    </cxf:cxfEndpoint>


**我认为问题出在外部接收器的实现上,因为没有它,它工作得很好**

    <camelContext id="CamelContext" trace="true" streamCache="true" useMDCLogging="true" useBreadcrumb="true" xmlns="http://camel.apache.org/schema/spring">
    <route id="RoutegetPointDetails">
          <from uri="jetty://http://0.0.0.0:8080/mockDiagnosticService"/>
         
          
          <to uri="cxf:bean:getPointDetails?dataFormat=MESSAGE"/>
   </route>
</camelContext>