WSO2 FHIR连接器:创建资源后处理FHIR服务器响应时出错

WSO2 FHIR连接器:创建资源后处理FHIR服务器响应时出错,wso2,wso2esb,axis2,hl7-fhir,Wso2,Wso2esb,Axis2,Hl7 Fhir,我已向服务器发送创建操作的请求。创建资源后,由于以下错误,服务器响应不会返回到客户端:Axis2Sender在发送消息时出现意外错误 服务器响应是HTTP/1.1201创建的 [2017-05-11 09:44:06,745] [] DEBUG - LoggingNHttpClientConnection http-outgoing-8: Consume input [2017-05-11 09:44:06,746] [] DEBUG - wire HTTPS-Sender I/O dispat

我已向服务器发送创建操作的请求。创建资源后,由于以下错误,服务器响应不会返回到客户端:
Axis2Sender在发送消息时出现意外错误

服务器响应是HTTP/1.1201创建的

[2017-05-11 09:44:06,745] [] DEBUG - LoggingNHttpClientConnection http-outgoing-8: Consume input
[2017-05-11 09:44:06,746] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "HTTP/1.1 201 Created[\r][\n]"
[2017-05-11 09:44:06,747] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Cache-Control: private[\r][\n]"
[2017-05-11 09:44:06,747] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Content-Length: 1155[\r][\n]"
[2017-05-11 09:44:06,748] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Content-Type: application/fhir+json; charset=utf-8[\r][\n]"
[2017-05-11 09:44:06,749] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Content-Location: https://sqlonfhir-stu3.azurewebsites.net/fhir/Patient/d1ecfb4f816d
466ab94479c662b1b448/_history/1[\r][\n]"
[2017-05-11 09:44:06,749] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Last-Modified: Thu, 11 May 2017 07:44:17 GMT[\r][\n]"
[2017-05-11 09:44:06,750] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "ETag: W/"1"[\r][\n]"
[2017-05-11 09:44:06,750] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Location: https://sqlonfhir-stu3.azurewebsites.net/fhir/Patient/d1ecfb4f816d466ab944
79c662b1b448/_history/1[\r][\n]"
[2017-05-11 09:44:06,751] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Server: Microsoft-IIS/8.0[\r][\n]"
[2017-05-11 09:44:06,751] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "X-AspNet-Version: 4.0.30319[\r][\n]"
[2017-05-11 09:44:06,751] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Request-Context: appId=cid-v1:db89bf18-68ce-4c00-a208-3700054b56ad[\r][\n]"
[2017-05-11 09:44:06,752] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "X-Powered-By: ASP.NET[\r][\n]"
[2017-05-11 09:44:06,752] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Set-Cookie: ARRAffinity=db0274c056695d20e92cbf53a580c5fe334eaf55b913573afc6435767938
c334;Path=/;Domain=sqlonfhir-stu3.azurewebsites.net[\r][\n]"
[2017-05-11 09:44:06,753] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "Date: Thu, 11 May 2017 07:44:16 GMT[\r][\n]"
[2017-05-11 09:44:06,753] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "[\r][\n]"
[2017-05-11 09:44:06,754] [] DEBUG - wire HTTPS-Sender I/O dispatcher-4 >> "{"resourceType":"Patient","id":"d1ecfb4f816d466ab94479c662b1b448","meta":{"versionId
":"1"...
但在处理响应时,WSO2抛出以下错误:

[2017-05-11 09:44:06,763] [] DEBUG - headers http-outgoing-8 << Date: Thu, 11 May 2017 07:44:16 GMT
[2017-05-11 09:44:06,764] [] DEBUG - TargetHandler http-outgoing-8: HTTP/1.1 201 Created
[2017-05-11 09:44:06,764] [] DEBUG - TargetHandler http-outgoing-8: Input ready
[2017-05-11 09:44:06,765] [] DEBUG - TargetHandler http-outgoing-8: Content decoder [content length: 1155; pos: 1155; completed: true]
[2017-05-11 09:44:06,769] [] DEBUG - RelayUtils Content Type is application/fhir+json; charset=utf-8
[2017-05-11 09:44:06,771] [] ERROR - Axis2Sender Unexpected error during sending message out
java.lang.NullPointerException
        at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:211)
        at org.apache.coyote.http11.InternalNioOutputBuffer.commit(InternalNioOutputBuffer.java:203)
        at org.apache.coyote.http11.AbstractHttp11Processor.action(AbstractHttp11Processor.java:776)
        at org.apache.coyote.Response.action(Response.java:174)
        at org.apache.coyote.Response.sendHeaders(Response.java:348)
        at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:352)
        at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:311)
        at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:108)
        at org.apache.synapse.transport.passthru.PassThroughHttpSender.sendUsingOutputStream(PassThroughHttpSender.java:308)
        at org.apache.synapse.transport.passthru.PassThroughHttpSender.invoke(PassThroughHttpSender.java:271)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185)
        at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595)
        at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)
        at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:118)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:281)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
[2017-05-11 11:29:18,247] [] DEBUG - TransportUtils Could not find a Builder for type (application/fhir+json).  Using SOAP.
[2017-05-11 11:29:18,257] []  INFO - BuilderUtil OMException in getSOAPBuilder
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
 at [row,col {unknown-source}]: [2,1]
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)...

[2017-05-11 09:44:06763][]调试-头文件http-outgoing-8您可以尝试使用以下生成器和格式化程序吗

<messageFormatter contentType="application/fhir+json" class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
<messageBuilder contentType="application/fhir+json" class="org.apache.synapse.commons.json.JsonStreamBuilder"/>

使用此生成器和格式化程序时,错误仍然存在:
[2017-05-12 15:39:46222][]错误-Axis2Sender在org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:211)发送消息时出现意外错误。
[2017-05-11 11:29:18,247] [] DEBUG - TransportUtils Could not find a Builder for type (application/fhir+json).  Using SOAP.
[2017-05-11 11:29:18,257] []  INFO - BuilderUtil OMException in getSOAPBuilder
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '{' (code 123) in prolog; expected '<'
 at [row,col {unknown-source}]: [2,1]
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)...
<messageFormatter contentType="application/fhir+json" class="org.apache.synapse.commons.json.JsonStreamFormatter"/>
<messageBuilder contentType="application/fhir+json" class="org.apache.synapse.commons.json.JsonStreamBuilder"/>