Reputation: 6791
I am trying to get the string representation of the HL7 message input to a channel. Documentation says
var myMessage = connectorMessage.getRawData()
should give me the original unparsed HL7 message. However the type of the data returned is an object and not a string. I tried using .toString()
but that doesn't work either. My javascript library code that expects a string and be able to split it fails because what's returned is not a string.
How do I get the original HL7 message string?
Upvotes: 0
Views: 3995
Reputation: 1719
connectorMessage.getRawData()
returns a Java string rather than a javascript string. You can convert to a javascript string by doing.
var myMessage = String(connectorMessage.getRawData())
This is true no matter what you have selected for your data type.
Upvotes: 1
Reputation: 693
On the Summary tab, click on "set data types", and change your inbound connector to "Raw"....after this, connectorMessage.getRawData() should return to you a long string that is the incoming message.
Upvotes: 0