web stats
Sending Encoded Base 64 and Decoding with Webservice - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 09-03-2015, 11:13 AM
Prolasis Prolasis is offline
Mirth Newb
Join Date: Apr 2015
Posts: 13
Prolasis is on a distinguished road
Default Sending Encoded Base 64 and Decoding with Webservice

Hi there i am trying to base64 decode some text i am sending through the webservice. Just testing for now and planing to send a CCD instead, but i noticed when using my code below on the source transformer my varialbe shows as "[B@5325185c" instead of the decoded data. Anyone have an idea of whats wrong. Maybe it the way i am decodeing the data in JS.

Sample Soap
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.connectors.connect.mirth.com/">
JS code
var Decoded = FileUtil.decode(connectorMessage.getRawData()); 

Reply With Quote
Old 09-04-2015, 07:52 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road

FileUtil.decode returns a byte array. Use "new java.lang.String(bytes, charset)" to convert that to a string.
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.

- How do I foo?
- You just bar.
Reply With Quote

ccd, ccda, soap, webservice, 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 08:07 PM.

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