web stats
Trasnformer message - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-10-2019, 12:02 AM
mberges mberges is offline
OBX.1 Kenobi
 
Join Date: Jan 2018
Posts: 45
mberges is on a distinguished road
Default Trasnformer message

Good. I need to transform an xml message with strange characters and send it to the destination channel. I have this transformer on but I do not know if it's okay, since it does not transform anything.

<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;20190310085837+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;1634624128162600&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>

Tranformer:

var mensaje = connectorMessage.getRawData();

return mensaje.replaceAll('&lt','<').replaceAll('&gt','>' );
Reply With Quote
  #2  
Old 03-10-2019, 12:09 PM
mberges mberges is offline
OBX.1 Kenobi
 
Join Date: Jan 2018
Posts: 45
mberges is on a distinguished road
Default

Solved, thank you
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 04:29 AM.


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