web stats
Issue CDATA encoding - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 08-06-2018, 08:37 AM
L33R L33R is offline
What's HL7?
Join Date: Apr 2018
Posts: 2
L33R is on a distinguished road
Default Issue CDATA encoding


I have a webservice listener and I'm using the default wsdl. I'm having problems with the encoding of CDATA. How do I change the the &lt to < etc.. so I can map the message ?

I have tried :
message = message.replace(/&lt;/g,'<');
message = message.replace(/&gt;/g,'>');

return message;
in the preprocessor but it doesn't work.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://ws.connectors.connect.mirth.com/">
        <acceptMessage>         <arg0>&lt;TestNumber&gt;&lt;Number&gt;1237567235&lt;/Number&gt;&lt;/TestNumber&gt;</arg0>

Last edited by L33R; 08-08-2018 at 03:44 AM.
Reply With Quote
Old 08-08-2018, 03:05 PM
agermano agermano is offline
Mirth Guru
Join Date: Apr 2017
Location: Indiana, USA
Posts: 955
agermano is on a distinguished road

You are receiving XML embedded in XML, so the inner XML is encoded.

In your transformer:
var testNumber = new XML(msg.toString());
Reply With Quote

cdata, encoding

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 08:46 AM.

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