Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 498197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:51:18+00:00 2026-05-13T05:51:18+00:00

The task is to send an XML object from Channel-A to Channel-B <MyMessage> <ID>42</ID>

  • 0

The task is to send an XML object from Channel-A to Channel-B

<MyMessage>
<ID>42</ID>
<hl7v2>
    MSH|^~\&|LAB|....
    PID|1|....
</hl7v2>
</MyMessage>

The steps of the channel communication:

  • in the Channel-B’s source transformer, extract the HL7v2 contents
  • OVERWRITE the current msg object in Channel-B with the extracted contents
  • continue in the other Channel-B source transformers and expecting to reference msg['PID']['PID.5'] as normal.

The good news is that I can extract the HL7v2 ‘payload’ into a variable. The problem or difficulty is resetting the msg object, or any other object to be able to reference the HL7 properties as expected.

When I create a new variable with the SerializerFactory.getHL7Serializer, it wraps with the tags <HL7Message>.

channelMap.put('MessageID', msg['ID']); //successful
channelMap.put('v2payload',msg['HL7v2']); //also looks good

var v2Msg = SerializerFactory.getHL7Serializer(false,false,true).toXML(msg['HL7v2']);

channelMap.put('v2Msg', v2Msg );

alt text link to full size image

Question: Do you have any suggestions on how to overwrite the msg object?

How can I start referencing the msg as such:

msg['PID']['PID.5']

Current Conditions

  • the receiving channel’s input type is XML
  • the need is to take extract all the properties from that XML object; ID is a database PK to be used later in the destination.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:51:19+00:00Added an answer on May 13, 2026 at 5:51 am

    I’m sorry my original answer was bogged down with the peculiarities of my own scenario. I have reworked and tested to ensure that this works in your scenario.

    Sending Channel – wraps the raw hl7 into your xml structure, and forwards to a channel called ReceiveXML. I have coded this in the Source Transformer, but you should code it where it works for you.

    var wrappedHL7 = <MyMessage><ID>123</ID>
                          <hl7v2>{messageObject.getRawData()}</hl7v2>
                     </MyMessage>;
    
    router.routeMessage("ReceiveXML", wrappedHL7);
    

    Receiving Channel – extracts the hl7 from the xml, converts it to xml, and assigns back to the msg object. I have coded this in the source Filter – hence “return true;”

    msg = new XML(SerializerFactory.getHL7Serializer(false,false,true).toXML(msg['hl7v2'].toString()));
    return true;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my Task is to send the G-Sensor Data nearly in realtime from an iOS
I am using Zend Framework. My task is to send JSON data from controller
How to call few model methods and send emails through my rake task?
TASK : I have an existing xml document (UTF-8) which uses xml namespaces and
the task I want to achieve is import XML file into SQL Server. Once
The task in my software involves several steps where each step may or may
Guys I'm new to xml in Java. I have the following task. I need
I'm new to AJAX and XML. I'm stuck on a school assignment.. The task
I have to send information too a third party in an XML format they
I want to create one application which send email with attachment(select file from SD

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.