web stats
XML data to variable always empty - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 07-08-2015, 02:16 PM
sr.brunet sr.brunet is offline
What's HL7?
Join Date: Sep 2014
Posts: 1
sr.brunet is on a distinguished road
Default XML data to variable always empty

Dear Community,

I'm stuck with this, I will appreciate any help.

I have a Webservice sender that does a Patient Query, the response is a RSP_K21 embedded in an XML with its SOAP envelope.

Something like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ConsultaPacientesResponse xmlns="http://tempuri.org">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;RSP_K21 xmlns="urn:hl7-org:v2xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

...And so on
To make it readable, I do this in the response transformer:

var respuesta = msg..*::ConsultaPacientesResult;

And "respuesta" looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<RSP_K21 xmlns="urn:hl7-org:v2xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
... And so on.
I need to store in a channel variable some of the fields of this XML. But always, no matter what I do, it always contains an empty string. I tried diffent notations but no way... I cannot access data within this tags.

I think this is a common issue within begginers but i'm not able to find the solution anywhere.


BTW, I'm using MIRTH
Reply With Quote

data, response, tags, variable, xml

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 10:54 PM.

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