Announcement

Collapse
No announcement yet.

Q: SOAP post test problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Q: SOAP post test problem

    Hi,
    I wrote a perl script to do some SOAP post test to Mirth SOAP listener.

    I did not get any errors reported in the log. However, I did not see the posted messages got processed either. Please help me verify if I missed any thing.

    Also attached the channel xml after the perl code.

    Thanks and merry Christmas,

    Charles


    ##### soappost.pl ##########
    require SOAP::Lite;

    $URL = 'http://localhost:8081/services/Mirth?wsdl';

    $xml = &#039;<ORU_R01><MSH><MSH.1 Item="1" Table="0" LongName="Field Separator" Type="ST">|</MSH.1><MSH.2 Item="2" Table="0" LongName="Encoding Characters" Type="ST" /><MSH.3 Item="3" Table="361" LongName="Sending Application" Type="HD"><HD.1 LongName="namespace ID" Type="IS" Table="300">AP01400037</HD.1></MSH.3><MSH.4 Item="4" Table="362" LongName="Sending Facility" Type="HD"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC1000037</HD.1></MSH.4><MSH.5 Item="5" Table="361" LongName="Receiving Application" Type="HD"><HD.1 LongName="namespace ID" Type="IS" Table="300">AP01400037</HD.1></MSH.5><MSH.6 Item="6" Table="362" LongName="Receiving Facility" Type="HD"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC01000037</HD.1></MSH.6><MSH.7 Item="7" Table="0" LongName="Date/Time Of Message" Type="TS">20060802130611.0000+0000</MSH.7><MSH.8 Item="8" Table="0" LongName="Security" Type="ST">BCCDCS Sender</MSH.8><MSH.9 Item="9" Table="76" LongName="Message Type" Type="CM_MSG_TYPE"><CM_MSG_TYPE.1 LongName="message type" Type="ID" Table="76">ZLI</CM_MSG_TYPE.1><CM_MSG_TYPE.2 LongName="trigger event" Type="ID" Table="3">L10</CM_MSG_TYPE.2></MSH.9><MSH.10 Item="10" Table="0" LongName="Message Control ID" Type="ST">BCCDCS_CHTest423</MSH.10><MSH.11 Item="11" Table="0" LongName="Processing ID" Type="PT"><PT.1 LongName="processing ID" Type="ID" Table="103">D</PT.1></MSH.11><MSH.12 Item="12" Table="104" LongName="Version ID" Type="VID"><VID.1 LongName="version ID" Type="ID" Table="104">2.300000</VID.1></MSH.12></MSH><ZHD><ZHD.1 Item="1" LongName="Business Event Date Time" Type="TS" Table="0">20060802130611+0000</ZHD.1><ZHD.2 Item="2" LongName="Business Organization" Type="TS" Table="0"><XON.1 LongName="organization name" Type="ST" Table="0">TB CONTROL - BCCDC</XON.1><XON.3 LongName="ID number (NM)" Type="NM" Table="0">50351</XON.3></ZHD.2><ZHD.7 Item="7" LongName="Software Version" Type="NM" Table="0">2.3</ZHD.7></ZHD><ORU_R01.LST.8><ORU_R01.GRP.5><ORU_R01.GRP.4>< PID><PID.2 Item="105" Table="0" LongName="Patient ID" Type="CX"><CX.1 LongName="ID" Type="ST" Table="0">-</CX.1><CX.4 LongName="assigning authority" Type="HD" Table="363"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC</HD.1></CX.4><CX.5 LongName="identifier type code" Type="IS" Table="203">PH</CX.5></PID.2><PID.3.LST><PID.3 Item="106" Table="0" LongName="Patient Identifier List" Type="CX"><CX.1 LongName="ID" Type="ST" Table="0">L-50530</CX.1><CX.4 LongName="assigning authority" Type="HD" Table="363"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC</HD.1></CX.4><CX.5 LongName="identifier type code" Type="IS" Table="203">ID</CX.5></PID.3></PID.3.LST><PID.5.LST><PID.5 Item="108" Table="0" LongName="Patient Name" Type="XPN"><XPN.1 LongName="family+last name" Type="CM" Table="0">DHERI</XPN.1><XPN.2 LongName="given name" Type="ST" Table="0">SANTA</XPN.2><XPN.7 LongName="name type code" Type="ID" Table="200">L</XPN.7></PID.5></PID.5.LST><PID.7 Item="110" Table="0" LongName="Date/Time Of Birth" Type="TS">19180310000000+0000</PID.7><PID.8 Item="111" Table="1" LongName="Sex" Type="IS">M</PID.8><PID.11.LST><PID.11 Item="114" Table="0" LongName="Patient Address" Type="XAD"><XAD.1 LongName="street address" Type="ST" Table="0">11632 82 AVE</XAD.1><XAD.3 LongName="city" Type="ST" Table="0">DELTA</XAD.3><XAD.4 LongName="state or province" Type="ST" Table="0">BC</XAD.4><XAD.5 LongName="zip or postal code" Type="ST" Table="0">V4C 2C4</XAD.5><XAD.6 LongName="country" Type="ID" Table="0">CAN</XAD.6><XAD.7 LongName="address type" Type="ID" Table="190">L</XAD.7></PID.11></PID.11.LST></PID></ORU_R01.GRP.4><ORU_R01.LST.7><ORU_R01.GRP.2><ORC>< ORC.2 Item="216" Table="0" LongName="Placer Order Number" Type="EI"><EI.1 LongName="entity identifier" Type="ST" Table="0">19394</EI.1><EI.2 LongName="namespace ID" Type="IS" Table="300">AP01400037</EI.2></ORC.2><ORC.3 Item="217" Table="0" LongName="Filler Order Number" Type="EI"><EI.1 LongName="entity identifier" Type="ST" Table="0">SEE COMMENT</EI.1><EI.2 LongName="namespace ID" Type="IS" Table="300">AP01400037</EI.2></ORC.3><ORC.4 Item="218" Table="0" LongName="Placer Group Number" Type="EI"><EI.1 LongName="entity identifier" Type="ST" Table="0">19394</EI.1><EI.2 LongName="namespace ID" Type="IS" Table="300">AP01400037</EI.2></ORC.4><ORC.5 Item="219" Table="38" LongName="Order Status" Type="ID">IP</ORC.5><ORC.9 Item="223" Table="0" LongName="Date/Time of Transaction" Type="TS">20060801131055+0000</ORC.9><ORC.10.LST><ORC.10 Item="224" Table="0" LongName="Entered By" Type="XCN"><XCN.1 LongName="ID number (ST)" Type="ST" Table="0">532</XCN.1><XCN.2 LongName="family+last name" Type="CM" Table="0">NA</XCN.2><XCN.3 LongName="given name" Type="ST" Table="0">NA</XCN.3><XCN.10 LongName="name type code" Type="ID" Table="200">Q</XCN.10></ORC.10></ORC.10.LST><ORC.12.LST><ORC.12 Item="226" Table="0" LongName="Ordering Provider" Type="XCN"><XCN.1 LongName="ID number (ST)" Type="ST" Table="0">410</XCN.1><XCN.2 LongName="family+last name" Type="CM" Table="0">NEW WESTMINISTER TB CLINIC</XCN.2><XCN.9 LongName="assigning authority" Type="HD" Table="363"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC</HD.1></XCN.9><XCN.10 LongName="name type code" Type="ID" Table="200">Q</XCN.10><XCN.13 LongName="identifier type code" Type="IS" Table="203">PR</XCN.13></ORC.12></ORC.12.LST></ORC><OBR><OBR.1 Item="237" Table="0" LongName="Set ID - OBR" Type="SI">3</OBR.1><OBR.2 Item="216" Table="0" LongName="Placer Order Number" Type="EI"><EI.1 LongName="entity identifier" Type="ST" Table="0">19394</EI.1><EI.2 LongName="namespace ID" Type="IS" Table="300">AP01400037</EI.2></OBR.2><OBR.3 Item="217" Table="0" LongName="Filler Order Number" Type="EI"><EI.1 LongName="entity identifier" Type="ST" Table="0">SEE COMMENT</EI.1><EI.2 LongName="namespace ID" Type="IS" Table="300">AP01400037</EI.2></OBR.3><OBR.4 Item="238" Table="0" LongName="Universal Service ID" Type="CE"><CE.1 LongName="identifier" Type="ST" Table="0">TBSMEAR</CE.1><CE.2 LongName="text" Type="ST" Table="0">TB SMEAR</CE.2><CE.3 LongName="name of coding system" Type="ST" Table="0">BCOTC</CE.3></OBR.4><OBR.7 Item="241" Table="0" LongName="Observation Date/Time #" Type="TS">20060704132400+0000</OBR.7><OBR.14 Item="248" Table="0" LongName="Specimen Received Date/Time *" Type="TS">20060707132400+0000</OBR.14><OBR.15 Item="249" Table="0" LongName="Specimen Source / Body Site" Type="CM"><CM_SPEC_BODY.1 LongName="specimen source name or code" Type="CE" Table="70"><CE.1 LongName="identifier" Type="ST" Table="0">SPUTUM</CE.1><CE.2 LongName="text" Type="ST" Table="0">SPUTUM</CE.2></CM_SPEC_BODY.1><CM_SPEC_BODY.4 LongName="body site" Type="CE" Table="163"><CE.1 LongName="identifier" Type="ST" Table="0">SPUTUM</CE.1><CE.2 LongName="text" Type="ST" Table="0">SPUTUM</CE.2></CM_SPEC_BODY.4></OBR.15><OBR.16.LST><OBR.16 Item="226" Table="0" LongName="Ordering Provider" Type="XCN"><XCN.1 LongName="ID number (ST)" Type="ST" Table="0">410</XCN.1><XCN.2 LongName="family+last name" Type="CM" Table="0">NEW WESTMINISTER TB CLINIC</XCN.2><XCN.9 LongName="assigning authority" Type="HD" Table="363"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC</HD.1></XCN.9><XCN.10 LongName="name type code" Type="ID" Table="200">Q</XCN.10><XCN.13 LongName="identifier type code" Type="IS" Table="203">PR</XCN.13></OBR.16></OBR.16.LST><OBR.22 Item="255" Table="0" LongName="Results Rpt/Status Chng - Date/Time +" Type="TS">20060801200000+0000</OBR.22><OBR.25 Item="258" Table="123" LongName="Result Status +" Type="ID">I</OBR.25><OBR.27.LST><OBR.27 Item="221" Table="0" LongName="Quantity/Timing" Type="TQ">R</OBR.27></OBR.27.LST><OBR.28.LST><OBR.28 Item="260" Table="0" LongName="Result Copies To" Type="XCN"><XCN.1 LongName="ID number (ST)" Type="ST" Table="0">410</XCN.1><XCN.2 LongName="family+last name" Type="CM" Table="0">NEW WESTMINISTER TB CLINIC</XCN.2><XCN.9 LongName="assigning authority" Type="HD" Table="363"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC</HD.1></XCN.9><XCN.10 LongName="name type code" Type="ID" Table="200">Q</XCN.10><XCN.13 LongName="identifier type code" Type="IS" Table="203">PR</XCN.13></OBR.28><OBR.28 Item="260" Table="0" LongName="Result Copies To" Type="XCN"><XCN.1 LongName="ID number (ST)" Type="ST" Table="0">578</XCN.1><XCN.2 LongName="family+last name" Type="CM" Table="0">VANCOUVER TB CLINIC</XCN.2><XCN.9 LongName="assigning authority" Type="HD" Table="363"><HD.1 LongName="namespace ID" Type="IS" Table="300">BC</HD.1></XCN.9><XCN.10 LongName="name type code" Type="ID" Table="200">Q</XCN.10><XCN.13 LongName="identifier type code" Type="IS" Table="203">PR</XCN.13></OBR.28></OBR.28.LST></OBR><ORU_R01.LST.3><NTE><NTE.1 Item="96" Table="0" LongName="Set ID - NTE" Type="SI">1</NTE.1><NTE.3.LST><NTE.3 Item="98" Table="0" LongName="Comment" Type="FT">BCCDC Requisition ID: F57321</NTE.3></NTE.3.LST></NTE></ORU_R01.LST.3><ORU_R01.LST.5><ORU_R01.GRP.1><OBX>< OBX.1 Item="569" Table="0" LongName="Set ID - OBX" Type="SI">1</OBX.1><OBX.2 Item="570" Table="125" LongName="Value Type" Type="ID">TX</OBX.2><OBX.3 Item="571" Table="0" LongName="Observation Identifier" Type="CE"><CE.1 LongName="identifier" Type="ST" Table="0">TBSMEAR</CE.1><CE.2 LongName="text" Type="ST" Table="0">TB SMEAR</CE.2><CE.3 LongName="name of coding system" Type="ST" Table="0">BCOTC</CE.3></OBX.3><OBX.4 Item="572" Table="0" LongName="Observation Sub-ID" Type="ST">1</OBX.4><OBX.5.LST><OBX.5 Item="573" Table="0" LongName="Observation Value" Type="WILDCARD">[REPORT DATE: 07-JUL-2006] No acid fast bacilli found.</OBX.5></OBX.5.LST><OBX.11 Item="579" Table="85" LongName="Observation Result Status" Type="ID">I</OBX.11><OBX.14 Item="582" Table="0" LongName="Date/Time of the Observation" Type="TS">20060707132456+0000</OBX.14></OBX></ORU_R01.GRP.1><ORU_R01.GRP.1><OBX><OBX.1 Item="569" Table="0" LongName="Set ID - OBX" Type="SI">2</OBX.1><OBX.2 Item="570" Table="125" LongName="Value Type" Type="ID">TX</OBX.2><OBX.3 Item="571" Table="0" LongName="Observation Identifier" Type="CE"><CE.1 LongName="identifier" Type="ST" Table="0">TBCULT</CE.1><CE.2 LongName="text" Type="ST" Table="0">TB CULTURE</CE.2><CE.3 LongName="name of coding system" Type="ST" Table="0">LN</CE.3></OBX.3><OBX.4 Item="572" Table="0" LongName="Observation Sub-ID" Type="ST">2</OBX.4><OBX.5.LST><OBX.5 Item="573" Table="0" LongName="Observation Value" Type="WILDCARD">[REPORT DATE: 07-JUL-2006] Growth of mycobacteria to be identified.</OBX.5></OBX.5.LST><OBX.11 Item="579" Table="85" LongName="Observation Result Status" Type="ID">I</OBX.11><OBX.14 Item="582" Table="0" LongName="Date/Time of the Observation" Type="TS">20060707132456+0000</OBX.14></OBX></ORU_R01.GRP.1><ORU_R01.GRP.1><OBX><OBX.1 Item="569" Table="0" LongName="Set ID - OBX" Type="SI">3</OBX.1><OBX.2 Item="570" Table="125" LongName="Value Type" Type="ID">TX</OBX.2><OBX.3 Item="571" Table="0" LongName="Observation Identifier" Type="CE"><CE.1 LongName="identifier" Type="ST" Table="0">TBCULT</CE.1><CE.2 LongName="text" Type="ST" Table="0">TB CULTURE</CE.2><CE.3 LongName="name of coding system" Type="ST" Table="0">LN</CE.3></OBX.3><OBX.4 Item="572" Table="0" LongName="Observation Sub-ID" Type="ST">3</OBX.4><OBX.5.LST><OBX.5 Item="573" Table="0" LongName="Observation Value" Type="WILDCARD">[REPORT DATE: 07-JUL-2006] SEE NOTE</OBX.5></OBX.5.LST><OBX.11 Item="579" Table="85" LongName="Observation Result Status" Type="ID">I</OBX.11><OBX.14 Item="582" Table="0" LongName="Date/Time of the Observation" Type="TS">20060707132456+0000</OBX.14></OBX><ORU_R01.LST.4><NTE><NTE.1 Item="96" Table="0" LongName="Set ID - NTE" Type="SI">1</NTE.1><NTE.3.LST><NTE.3 Item="98" Table="0" LongName="Comment" Type="FT">A6TS </NTE.3></NTE.3.LST></NTE></ORU_R01.LST.4></ORU_R01.GRP.1><ORU_R01.GRP.1><OBX><OBX.1 Item="569" Table="0" LongName="Set ID - OBX" Type="SI">4</OBX.1><OBX.2 Item="570" Table="125" LongName="Value Type" Type="ID">TX</OBX.2><OBX.3 Item="571" Table="0" LongName="Observation Identifier" Type="CE"><CE.1 LongName="identifier" Type="ST" Table="0">TBCULT</CE.1><CE.2 LongName="text" Type="ST" Table="0">TB CULTURE</CE.2><CE.3 LongName="name of coding system" Type="ST" Table="0">LN</CE.3></OBX.3><OBX.4 Item="572" Table="0" LongName="Observation Sub-ID" Type="ST">4</OBX.4><OBX.5.LST><OBX.5 Item="573" Table="0" LongName="Observation Value" Type="WILDCARD">[REPORT DATE: 07-JUL-2006] Mycobacterium tuberculosis</OBX.5></OBX.5.LST><OBX.11 Item="579" Table="85" LongName="Observation Result Status" Type="ID">I</OBX.11><OBX.14 Item="582" Table="0" LongName="Date/Time of the Observation" Type="TS">20060707132456+0000</OBX.14></OBX></ORU_R01.GRP.1></ORU_R01.LST.5></ORU_R01.GRP.2></ORU_R01.LST.7></ORU_R01.GRP.5></ORU_R01.LST.8></ORU_R01>&#039;;

    #print $xml."\n";

    print "Connecting to Mrith Service...\n";
    print SOAP::Lite
    -> service($URL)
    -> acceptMessage ($xml);


    ###### Channel Configuration file ##########

    <com.webreach.mirth.model.Channel>
    <id>5a54619f-2fe6-456d-82eb-a5f05c25df43</id>
    <name>WStest</name>
    <description></description>
    <enabled>true</enabled>
    <version>1.3.0</version>
    <revision>9</revision>
    <direction>INBOUND</direction>
    <protocol>HL7</protocol>
    <mode>BROADCAST</mode>
    <sourceConnector>
    <name>sourceConnector</name>
    <properties>
    <property name="port">8081</property>
    <property name="DataType">SOAP Listener</property>
    <property name="listenerAddress">localhost</property>
    <property name="serviceName">Mirth</property>
    <property name="host">axis:http://localhost:8081/services</property>
    <property name="Content-Type">text/xml</property>
    </properties>
    <transformer>
    <steps>
    <com.webreach.mirth.model.Step>
    <sequenceNumber>0</sequenceNumber>
    <name>showMsg</name>
    <script>var msh = msg[&apos;MSH&apos;][&apos;MSH.1&apos;];
    logger.error(&quot;showMsg: msh == &quot; + msh);</script>
    <type>JavaScript</type>
    <data class="map">
    <entry>
    <string>Script</string>
    <string>var msh = msg[&apos;MSH&apos;][&apos;MSH.1&apos;];
    logger.error(&quot;showMsg: msh == &quot; + msh);</string>
    </entry>
    </data>
    </com.webreach.mirth.model.Step>
    </steps>
    <template></template>
    </transformer>
    <filter>
    <rules/>
    </filter>
    <transportName>SOAP Listener</transportName>
    </sourceConnector>
    <destinationConnectors>
    <com.webreach.mirth.model.Connector>
    <name>Destination 1</name>
    <properties>
    <property name="URL">jdbc:mysql://localhost:3306/msgrpt</property>
    <property name="DataType">Database Writer</property>
    <property name="password">h0557ee</property>
    <property name="host">query</property>
    <property name="driver">com.mysql.jdbc.Driver</property>
    <property name="query">INSERT IGNORE INTO outbound1 (HL7msg,outinterface,outbuildnum,MSH7,ininterface, inbuildnum,event) values (${message.rawData},&apos;wstestout&apos;,&apos;12 3&apos;,&apos;1234567&apos;,&apos;ws&apos;,&apos;4 56&apos;,&apos;test&apos;</property>
    <property name="username">root</property>
    </properties>
    <transformer>
    <steps/>
    </transformer>
    <filter>
    <rules/>
    </filter>
    <transportName>Database Writer</transportName>
    </com.webreach.mirth.model.Connector>
    </destinationConnectors>
    <properties>
    <property name="initialState">started</property>
    <property name="synchronous">false</property>
    <property name="store_messages">true</property>
    <property name="recv_xml_encoded">true</property>
    <property name="encryptData">false</property>
    <property name="transactional">false</property>
    <property name="max_message_age">-1</property>
    <property name="error_messages_only">false</property>
    </properties>
    <preprocessingScript>// Modify the message variable below to pre process data&#x0D;
    return message;</preprocessingScript>
    </com.webreach.mirth.model.Channel>
Working...
X