Announcement

Collapse
No announcement yet.

Get a web Service Response from a web service listener

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

  • Get a web Service Response from a web service listener

    Hello Mirth Community,

    Actually, I've got a Web Service Listener, that gets a Soap envelope.
    When I want to select a child, it does return nothing.

    My message is on the following format :


    Code:
    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<soap:Header/>
    	<soap:Body>
    		<DevuelveSolicitudLabResponse xmlns="http://localhost/WSMiddlewareR/WSMiddlewareR.asmx">
    			<DevuelveSolicitudLabResult>
    				<Solicitud_Lab xmlns="">
    					<Solicitud>
    						<emridrequest></emridrequest>
    						<emridhealthcardnumber/>
    						<emridhistory></emridhistory>
    						<TIN/>
    						<emrdaterequest></emrdaterequest>
    						<emrdateprobablysample></emrdateprobablysample>
    						<sourceehelathcenter></sourceehelathcenter>
    						<emrtyperequest></emrtyperequest>
    						<emrdateinsertion></emrdateinsertion>
    						<emrnamecustomer></emrnamecustomer>
    						<emrfirstsurname></emrfirstsurname>
    						<emrsecondsurname/>
    						<emrdatebirthcustomer></emrdatebirthcustomer>
    						<emrgendercustomer></emrgendercustomer>
    						<emrphonecustomer/>
    						<emrbed></emrbed>
    						<emrprotectedcustomer></emrprotectedcustomer>
    						<emrservrequest></emrservrequest>
    						<emrcodservrequest></emrcodservrequest>
    						<emridcarddoctor></emridcarddoctor>
    						<emrnamedoctor></emrnamedoctor>
    						<emrdoctorfirstsurname></emrdoctorfirstsurname>
    						<emrdoctorsecondsurname/>
    						<emrtrialclinical/>
    						<emrdatismini/>
    						<emrnationalityid></emrnationalityid>
    						<emrdatereading/>
    						<emrdateerased/>
    						<lisidcarddoctorperformed/>
    						<lisnamedoctorperformed/>
    						<lisfirstsurnameperformed/>
    						<lissecondsurnameperformed/>
    						<lisidcardtechnical/>
    						<lisnametechnical/>
    						<lisfirstsurnametechnical/>
    						<lissecondsurnametechnical/>
    						<lisdatereceivedsample/>
    						<lisdatereading></lisdatereading>
    						<lisdatecompleted/>
    						<lisdateerased/>
    						<lissummaryanalysis/>
    						<emridhealthcentre></emridhealthcentre>
    						<emrpolicy/>
    						<emridcollective></emridcollective>
    						<lisurlresult/>
    						<EMRAUTHORIZATIONID/>
    						<EMRWHEELNUMBER/>
    						<EMRARRIVALDATE/>
    						<EMRATTENTIONDATE/>
    						<EMRLABELDATE/>
    					</Solicitud>
    					<Pruebas>
    						<emridrequest></emridrequest>
    						<emridtest></emridtest>
    						<emridhealthcardnumber/>
    						<emridhistory></emridhistory>
    						<sourceehelathcenter></sourceehelathcenter>
    						<emrtyperequest></emrtyperequest>
    						<emrdateinsertion></emrdateinsertion>
    						<emrdatereading/>
    						<emrdateerased/>
    						<lisidtube/>
    						<lisresult/>
    						<liscomment/>
    						<lisunits/>
    						<lisstate/>
    						<lisvaluetop/>
    						<lisvalueindate/>
    						<lisvaluetext/>
    						<lisvaluecoment/>
    						<lisdateentrysample/>
    						<lisidcarddoctorperformed/>
    						<lisnamedoctorperformed/>
    						<lisfirstsurnameperformed/>
    						<lissecondsurnameperformed/>
    						<lisidcardtechnical/>
    						<lisnametechnical/>
    						<lisfirstsurnametechnical/>
    						<lissecondsurnametechnical/>
    						<lisidprofilebill/>
    						<lisdatereading></lisdatereading>
    						<lisdateresults/>
    						<lisdatemodified/>
    						<liscomplement/>
    						<lisisresultemp></lisisresultemp>
    						<lispathological/>
    					</Pruebas>
    				</Solicitud_Lab>
    			</DevuelveSolicitudLabResult>
    		</DevuelveSolicitudLabResponse>
    	</soap:Body>
    </soap:Envelope>
    My objective is to select the child <Solicitud_Lab>. I tried to select the body like that :

    Code:
    msg['Body'] , msg.Body
    Without doing this, the soap envelope is giving a response full of information. But selecting the Body makes it null.

    Note : I unchecked Strip Namespaces
    Any help ? Thanks a lot
    Last edited by moadattebayo; 10-19-2017, 06:49 AM.

  • #2
    If you are not stripping the namespaces, then you need to reference them.

    msg.*::Body

    Comment


    • #3
      Magic is within programmers

      Originally posted by cbarlow View Post
      If you are not stripping the namespaces, then you need to reference them.

      msg.*::Body
      Thanks buddy it worked like magic !!

      If I let strip namespaces checked, what should I do?

      Comment


      • #4
        I think in your XML, you cannot strip them. Only option would be to run some sort of replace script to remove the soap:

        Comment

        Working...
        X