web stats
Parser XML Webservice - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-08-2019, 07:50 AM
mberges mberges is offline
OBX.1 Kenobi
 
Join Date: Jan 2018
Posts: 30
mberges is on a distinguished road
Default Parser XML Webservice

Good. I have a problem when sending a message to a webservice. I am generating this message and I would like to remove the strange symbols and send the message.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http:///">
<soapenv:Header/>
<soapenv:Body>
<typ:consultaElement>
<typ:msgXml><![CDATA[<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><consultaElement xmlns="http:///"><msgXml>&lt;QBP_Q21 xmlns="urn:hl7-org:v2xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;&lt;MSH&gt;&lt;MSH.1&gt;|&lt;/MSH.1&gt;&lt;MSH.2&gt;^~\&amp;amp;amp;&lt;/MSH.2&gt;&lt;MSH.3&gt;&lt;HD.1&gt;MOD_440048&lt;/HD.1&gt;&lt;/MSH.3&gt;&lt;MSH.4&gt;&lt;HD.1&gt;440048&lt;/HD.1&gt;&lt;/MSH.4&gt;&lt;MSH.7&gt;&lt;TS.1&gt;20190308174518+0 100&lt;/TS.1&gt;&lt;/MSH.7&gt;&lt;MSH.8/&gt;&lt;MSH.9&gt;&lt;MSG.1&gt;QBP&lt;/MSG.1&gt;&lt;MSG.2&gt;Q22&lt;/MSG.2&gt;&lt;MSG.3&gt;QBP_Q21&lt;/MSG.3&gt;&lt;/MSH.9&gt;&lt;MSH.10&gt;1493424520587500&lt;/MSH.10&gt;&lt;MSH.11&gt;&lt;PT.1/&gt;&lt;/MSH.11&gt;&lt;MSH.12&gt;&lt;VID.1&gt;2.5&lt;/VID.1&gt;&lt;/MSH.12&gt;&lt;MSH.18&gt;8859/1&lt;/MSH.18&gt;&lt;/MSH&gt;&lt;SFT/&gt;&lt;QPD&gt;&lt;QPD.1&gt;&lt;CE.1&gt;Q22&lt;/CE.1&gt;&lt;CE.2&gt;Busqueda usuario&lt;/CE.2&gt;&lt;CE.3&gt;HL7_471&lt;/CE.3&gt;&lt;/QPD.1&gt;&lt;QPD.3&gt;&lt;CIA&gt;&lt;/CIA&gt;&lt;NIF&gt;&lt;/NIF&gt;&lt;NOM/&gt;&lt;APE1/&gt;&lt;APE2/&gt;&lt;SIT/&gt;*&lt;TIP/&gt;&lt;TEL/&gt;&lt;FNAC/&gt;&lt;CIP/&gt;&lt;NHC/&gt;&lt;/QPD.3&gt;&lt;/QPD&gt;&lt;RCP&gt;&lt;RCP.2&gt;&lt;CQ.1&gt;10&lt;/CQ.1&gt;&lt;/RCP.2&gt;&lt;/RCP&gt;&lt;/QBP_Q21&gt;</msgXml></consultaElement></S:Body></S:Envelope>]]>
</typ:msgXml>
</typ:consultaElement>
</soapenv:Body>
</soapenv:Envelope>


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http:///">
<soapenv:Header/>
<soapenv:Body>
<typ:consultaElement>
<typ:msgXml><![CDATA[<QBP_Q21 xmlns="urn:hl7-org:v2xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><MSH><MSH.1>|</MSH.1><MSH.2>^~\&amp;</MSH.2><MSH.3><HD.1>MOD_440048</HD.1></MSH.3><MSH.4><HD.1>440048</HD.1></MSH.4><MSH.7><TS.1>20190308152434+0100</TS.1></MSH.7><MSH.8/><MSH.9><MSG.1>QBP</MSG.1><MSG.2>Q22</MSG.2><MSG.3>QBP_Q21</MSG.3></MSH.9><MSH.10>1484980317546000</MSH.10><MSH.11><PT.1/></MSH.11><MSH.12><VID.1>2.5</VID.1></MSH.12><MSH.18>8859/1</MSH.18></MSH><SFT/><QPD><QPD.1><CE.1>Q22</CE.1><CE.2>Busqueda usuario</CE.2><CE.3>HL7_471</CE.3></QPD.1><QPD.3><CIA></CIA><NIF></NIF><NOM/><APE1/><APE2/><SIT/>*<TIP/><TEL/><FNAC/><CIP/><NHC/></QPD.3></QPD><RCP><RCP.2><CQ.1>10</CQ.1></RCP.2></RCP></QBP_Q21>]]></typ:msgXml>
</typ:consultaElement>
</soapenv:Body>
</soapenv:Envelope>
Reply With Quote
  #2  
Old 03-08-2019, 08:19 AM
AlexNeiva AlexNeiva is offline
Mirth Guru
 
Join Date: Oct 2013
Location: Portugal
Posts: 275
AlexNeiva is on a distinguished road
Default

Hello mberge,


you replace the values using javascript code:


Code:
yourString.replace(/&lt;/g,'<');
yourString.replace(/&gt;/g,'>');

give it a try




Best Regards
__________________
Best Regards,
Alex Neiva
Reply With Quote
Reply

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 01:36 AM.


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