WSO2 EI How to Send HL7 message (extract from XML SOAP)

164 Views Asked by At

how can I extract RAW HL7message from XML SOAP (taken from DB) and use endpoint to send it to HL7://localhost:20101 server ?

I have this message body:

<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<row xmlns="SERVICE_HL7IN">
<DATA1>
MSH|^~\&amp;|||||20210414014542.151+0200||MDM^T04^MDM_T02|401|T|2.5&#xd;
</DATA1>
</row>
</soapenv:Body>

and I need to send this to endpoint:

MSH|^~\&amp;|||||20210414014542.151+0200||MDM^T04^MDM_T02|401|T|2.5&#xd;

Here is the sequence:

<sequence>
    <log level="custom">
        <property expression="$body" name="outbod"/>
    </log>
    <property expression="//xsi:row/xsi:DATA1" name="sendmsg" scope="default" type="STRING"/>
    <log level="custom">
        <property expression="get-property('sendmsg')" name="outb"/>
    </log>
    <property name="HL7_RESULT_MODE" scope="axis2" type="STRING" value="ACK"/>
    <property expression="get-property('sendmsg')" name="body" scope="axis2" type="STRING"/>
    <payloadFactory media-type="text">
        <format>
          $1
        </format>
        <args>
            <arg expression="get-property('sendmsg')">
            </arg>
        </args>
    </payloadFactory>
    <property name="messageType" scope="axis2" type="STRING" value="application/edi-hl7"/>
    <property name="contentType" scope="axis2" type="STRING" value="application/edi-hl7"/>
    <log level="full" />
    <send>
        <endpoint>
            <address uri="hl7://localhost:20101"/>
        </endpoint>
     </send>
</sequence>

Any help or advice is appretiated

0

There are 0 best solutions below