Announcement

Collapse
No announcement yet.

How to properly format inbound and outbound messages for Web Channel readers

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

  • How to properly format inbound and outbound messages for Web Channel readers

    Folks,

    My learning curve of Mirth channel with Web service listeners and "Dispatch pattern" based on the contents of incoming X12 message (in the SOAP envelope as attached Tesia270.xml shows) brought some results :0

    Now I have finally published that service to the open Web:
    HTML Code:
    http://mirthconnect-dev-375423265.us-west-2.elb.amazonaws.com:8088/services/TestEligibilityDispatcher?wsdl
    and tested it from soapUI. First, I was getting errors b/c of expected XML format mismatched the WSDL that was generated:

    Code:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.connectors.connect.mirth.com/">
       <soapenv:Header/>
       <soapenv:Body>
          <ws:acceptMessage>
             <!--Optional:-->
             <arg0>
             ISA*00*          *00*          *12*ABCCOM         *01*999999999      *120117*1719*U*00400*000006768*0*P*&gt;
    		GS*HS*4405197800*999999999*20120117*1719*1421*X*004010VICS
    		ST*270*1234
    		BHT*0022*13*1*20010820*1330
    		HL*1**20*1
    		NM1*PR*2******PI*123456789
    		HL*2*1*21*1
    		NM1*1P*2******SV*987654321
    		HL*3*2*22*0
    		NM1*IL*1*DOE*JANE****MI*345678901
    		EQ*30**FAM
    		SE*10*1234
    		GE*1*1421
    		IEA*1*000006768
             </arg0>
          </ws:acceptMessage>
       </soapenv:Body>
    </soapenv:Envelope>
    but then I changed the Response to "Destination 2" and left the SOurce transformer XML ==> X12 and for some reason it "almost* works returning this SOAP response:

    Code:
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
       <S:Body>
          <ns2:acceptMessageResponse xmlns:ns2="http://ws.connectors.connect.mirth.com/">
             <return><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?><soap:Envelope   ><soap:Header/><soap:Body><HelloWorldResponse ><HelloWorldResult>Hello World</HelloWorldResult></HelloWorldResponse></soap:Body></soap:Envelope>]]></return>
          </ns2:acceptMessageResponse>
       </S:Body>
    </S:Envelope>
    Why does it work when actual SOAP request format does not macththe Source expected one and what should I do to get rid of CDATA! tags in the response, please?

    thanks as always,
    Dan Z
    Attached Files
Working...
X