Note that there are some explanatory texts on larger screens.

plurals
  1. POWSO2 ESB HL7 Transport Acknowledgement issue
    primarykey
    data
    text
    <p>WSO2 ESB provides the HL7 transport which is nice option. The transport operates in couple of modes 1) Default mode: auto acknowledge 2) NACK mode: No acknowledgement 3) ACK mode: Custom acknowledgement from the downstream sequence or another HL7 endpoint. These modes are documented <a href="http://docs.wso2.org/wiki/display/ESB451/HL7+Transport" rel="nofollow">http://docs.wso2.org/wiki/display/ESB451/HL7+Transport</a>. This JIRA tracker also confirms the same information on configuration of modes. <a href="https://wso2.org/jira/browse/ESBJAVA-954" rel="nofollow">https://wso2.org/jira/browse/ESBJAVA-954</a> </p> <p>The issue that I am facing is that the ACK mode which allows for the acknowledgement from downstream application or sequence to be returned back to the application which had initiated the call to WSO2 ESB. I can clearly see in the log that the downstream application or sequence is returning back the acknowledgement and that is getting parsed by the HL7 transport API. However, the application that is waiting for response from WSO2 ESB always gets default acknowledgement only. </p> <p>When looking into the HL7 transport code, it looks like that the WSO2 code has a defect and its never returning acknowledgement from downstream sequence. Here is the method from the HL7ProcessingContext.java</p> <pre><code>public Message handleHL7Result(MessageContext ctx, Message hl7Msg) throws HL7Exception { String resultMode = (String) ctx.getProperty(HL7Constants.HL7_RESULT_MODE); if (resultMode != null) { if (HL7Constants.HL7_RESULT_MODE_ACK.equals(resultMode)) { return this.createAck(hl7Msg); } else if (HL7Constants.HL7_RESULT_MODE_NACK.equals(resultMode)) { String nackMessage = (String) ctx.getProperty(HL7Constants.HL7_NACK_MESSAGE); if (nackMessage == null) { nackMessage = ""; } return this.createNack(hl7Msg, nackMessage); } } else if (this.isAutoAck()) { return this.createAck(hl7Msg); } return this.createNack(hl7Msg, "Application Error: ACK/NACK was not explicitely returned"); } </code></pre> <p>If I am not mistaken, this code needs to be altered as shown below</p> <pre><code>***** Original Code from above**** if (HL7Constants.HL7_RESULT_MODE_ACK.equals(resultMode)) { return this.createAck(hl7Msg); } ***** Revised code ***** if (HL7Constants.HL7_RESULT_MODE_ACK.equals(resultMode)) { OMElement omElement = msgCtx.getEnvelope().getBody().getFirstElement().getFirstElement(); String xmlFormat = omElement.toString(); Message message = this.xmlParser.parse(xmlFormat); return message; } </code></pre> <p>Could someone confirm this fix?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload