Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 从mule 3.6.2迁移到3.8.2_Java_Mule - Fatal编程技术网

Java 从mule 3.6.2迁移到3.8.2

Java 从mule 3.6.2迁移到3.8.2,java,mule,Java,Mule,我正在将现有应用程序从3.6.2升级到3.8.2。配置更改后,REST调用将正常工作。但是在运行SOAP调用流时,在StaxDataBinding.java中获取NullPointerException。服务返回200,但最后流失败,状态代码为500 Mule 3.6.2的旧配置文件: <flow name="testws-srr">        <http:inbound-endpoint host="${app.host}" port="${app.port}" path

我正在将现有应用程序从3.6.2升级到3.8.2。配置更改后,REST调用将正常工作。但是在运行SOAP调用流时,在StaxDataBinding.java中获取NullPointerException。服务返回200,但最后流失败,状态代码为500

Mule 3.6.2的旧配置文件:

<flow name="testws-srr">
       <http:inbound-endpoint host="${app.host}" port="${app.port}" path="testWs" exchange-pattern="request-response" doc:name="HTTP">
          <cxf:proxy-service/>
       </http:inbound-endpoint>
       <msr:resolve-endpoint serviceName="TestService" basicAuthSupport="true"/>
       <http:outbound-endpoint ref="msr-resolvedEndpoint" exchange-pattern="request-response" responseTimeout="30000" doc:name="HTTP">
          <cxf:proxy-client/>
       </http:outbound-endpoint>
       <custom-exception-strategy class="com.mule.errorhandling.exception.CustomExceptionHandlingStrategy" doc:name="Custom Exception Strategy">
         <spring:property name="code" value="TA102" />
         <spring:property name="message" value="${error.TA102}"/>
      </custom-exception-strategy>
    </flow>
猜测它是否与多部分响应有关

Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:7f7f18e7-44ab-44dc-bf18-33954bf602f9"; start="<root.message@cxf.apache.org>"; start-info="text/xml"
内容类型:多部分/相关;type=“应用程序/xop+xml”;边界=“uuid:7f7f18e7-44ab-44dc-bf18-33954bf602f9”;start=“”;start info=“text/xml”

这是通过在http请求连接器中添加parseResponse=“false”和在http侦听器中添加类似的parseRequest=“false”来解决的

禁用HTTP响应体解析:与HTTP侦听器一样 连接器,当HTTP响应的内容类型为 application/x-www-form-urlencoded或multipart/form数据,HTTP 请求连接器自动执行消息的解析。 如果愿意,可以通过执行以下操作禁用此解析功能: 以下: •XML编辑器:将parseResponse属性设置为false •Studio UI:取消选中的“高级”选项卡中的“解析响应”复选框 HTTP请求连接器


参考:

这是通过在http请求连接器中添加parseResponse=“false”和在http侦听器中添加类似的parseRequest=“false”来解决的

禁用HTTP响应体解析:与HTTP侦听器一样 连接器,当HTTP响应的内容类型为 application/x-www-form-urlencoded或multipart/form数据,HTTP 请求连接器自动执行消息的解析。 如果愿意,可以通过执行以下操作禁用此解析功能: 以下: •XML编辑器:将parseResponse属性设置为false •Studio UI:取消选中的“高级”选项卡中的“解析响应”复选框 HTTP请求连接器

参考:

2017-09-25 10:39:42,844 logLevel="WARN" [[-auto-esb].msr-listener-httpConnector.worker.01] org.apache.cxf.phase.PhaseInterceptorChain: Interceptor for {http://support.cxf.module.mule.org/}ProxyService has thrown exception, unwinding now
java.lang.NullPointerException
   at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:147) ~[cxf-rt-core-2.7.18.jar:2.7.18]
   at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:135) ~[cxf-rt-core-2.7.18.jar:2.7.18]
   at org.apache.cxf.databinding.stax.StaxDataBinding$XMLStreamDataWriter.write(StaxDataBinding.java:131) ~[cxf-rt-core-2.7.18.jar:2.7.18]
   at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:141) ~[cxf-api-2.7.18.jar:2.7.18]
   at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68) ~[cxf-api-2.7.18.jar:2.7.18]
   at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) ~[cxf-api-2.7.18.jar:2.7.18]
   at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:242) ~[cxf-api-2.7.18.jar:2.7.18]
   at org.mule.module.cxf.CxfInboundMessageProcessor$2.write(CxfInboundMessageProcessor.java:541) ~[mule-module-cxf-3.8.2.jar:3.8.2]
   at org.mule.tranformer.simple.ObjectToByteArray.doTranform(ObjectToByteArray.java:63) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.tranformer.AbstractTranformer.tranform(AbstractTranformer.java:415) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:406) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.DefaultMuleMessage.getPayload(DefaultMuleMessage.java:354) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.DefaultMuleMessage.getPayloadAsBytes(DefaultMuleMessage.java:741) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.HttpResponseBuilder.build(HttpResponseBuilder.java:208) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.HttpMessageProcessorTemplate.doBuildResponse(HttpMessageProcessorTemplate.java:122) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.HttpMessageProcessorTemplate.buildResponse(HttpMessageProcessorTemplate.java:112) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.HttpMessageProcessorTemplate.sendResponseToClient(HttpMessageProcessorTemplate.java:86) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:78) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:35) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.phaseSuccesfully(PhaseExecutionEngine.java:65) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.phaseSuccesfully(PhaseExecutionEngine.java:69) ~[mule-core-3.8.2.jar:3.8.2]
   at com.mulesoft.mule.throttling.ThrottlingPhase.runPhase(ThrottlingPhase.java:187) ~[mule-module-throttling-ee-3.8.2.jar:3.8.2]
   at com.mulesoft.mule.throttling.ThrottlingPhase.runPhase(ThrottlingPhase.java:58) ~[mule-module-throttling-ee-3.8.2.jar:3.8.2]
   at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.phaseSuccesfully(PhaseExecutionEngine.java:65) ~[mule-core-3.8.2.jar:3.8.2]
   at com.mulesoft.gateway.http.phases.GatewayValidationPhase.runPhase(GatewayValidationPhase.java:93) ~[gateway-core-3.8.2.jar:3.8.2]
   at com.mulesoft.gateway.http.phases.GatewayValidationPhase.runPhase(GatewayValidationPhase.java:49) ~[gateway-core-3.8.2.jar:3.8.2]
   at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.phaseSuccesfully(PhaseExecutionEngine.java:65) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.modules.cors.CorsPhase.runPhase(CorsPhase.java:113) ~[mule-module-cors-gw-3.8.2.jar:3.8.2]
   at org.mule.modules.cors.CorsPhase.runPhase(CorsPhase.java:40) ~[mule-module-cors-gw-3.8.2.jar:3.8.2]
   at org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.process(PhaseExecutionEngine.java:114) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.execution.PhaseExecutionEngine.process(PhaseExecutionEngine.java:41) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.execution.MuleMessageProcessingManager.processMessage(MuleMessageProcessingManager.java:32) ~[mule-core-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.DefaultHttpListener$1.handleRequest(DefaultHttpListener.java:133) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:83) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.glasfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.glasfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.glasfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.glasfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.glasfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.glasfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.glasfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.glasfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[grizzly-framework-2.3.26.jar:2.3.26]
   at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:102) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:30) ~[mule-module-http-3.8.2.jar:3.8.2]
   at org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:125) ~[mule-module-http-3.8.2.jar:3.8.2]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
   at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
2017-09-25 10:39:42,848 logLevel="DEBUG" [[-auto-esb].msr-listener-httpConnector.worker.01] org.mule.module.http.internal.HttpMessageLogger: LISTENER
HTTP/1.1 500 
Content-Length: 0
Content-Type: text/xml; charset=UTF-8
Date: Mon, 25 Sep 2017 15:39:42 GMT
Connection: close
Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:7f7f18e7-44ab-44dc-bf18-33954bf602f9"; start="<root.message@cxf.apache.org>"; start-info="text/xml"