web stats
Get a web Service Response from a web service listener - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2017, 07:42 AM
moadattebayo moadattebayo is offline
Mirth Newb
 
Join Date: Jul 2017
Posts: 7
moadattebayo is on a distinguished road
Default Get a Soap body from a WS Sender to a WS 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 at 07:49 AM.
Reply With Quote
  #2  
Old 10-19-2017, 08:15 AM
cbarlow cbarlow is offline
OBX.2 Kenobi
 
Join Date: Sep 2015
Location: Missouri
Posts: 52
cbarlow is on a distinguished road
Default

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

msg.*::Body
Reply With Quote
  #3  
Old 10-19-2017, 08:18 AM
moadattebayo moadattebayo is offline
Mirth Newb
 
Join Date: Jul 2017
Posts: 7
moadattebayo is on a distinguished road
Thumbs up Magic is within programmers

Quote:
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?
Reply With Quote
  #4  
Old 10-19-2017, 08:26 AM
cbarlow cbarlow is offline
OBX.2 Kenobi
 
Join Date: Sep 2015
Location: Missouri
Posts: 52
cbarlow is on a distinguished road
Default

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

Tags
response, soap, soap envelope, ws listener, xml child segments

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:30 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation