web stats
HTTP Sender reponse? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-17-2014, 05:04 AM
rastababy rastababy is offline
OBX.2 Kenobi
 
Join Date: Mar 2008
Posts: 72
rastababy
Lightbulb HTTP Sender reponse?

Using a the HTTP Sender to call a restful service. I then have a 2nd destination I created to handle the response from the call.

Problem I'm running into is that the response is XML that is BASE64 encoded and I cannot seem to decode it.

Is there a way or setting Mirth has to Decode the string? I've tried the FileUtil.Decode, but that result is not correct either. No errors, just a shorter BASE64 string.

Any guidance would be appreciated. I'm thinking of switch the webservice call and implementing it in javascript instead.

Using v3.1.1
Reply With Quote
  #2  
Old 11-17-2014, 06:09 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,098
narupley is on a distinguished road
Default

How exactly are you doing the decoding? Realize that FileUtil.decode returns a byte array. If that byte array is textual data, you should wrap that in a string:

Code:
var decodedData = new java.lang.String(FileUtil.decode(base64Data), charset);
Do you have a sample response envelope?
__________________
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
  #3  
Old 11-17-2014, 06:31 AM
rastababy rastababy is offline
OBX.2 Kenobi
 
Join Date: Mar 2008
Posts: 72
rastababy
Default

got it. thanks!
Reply With Quote
Reply

Tags
http sender, webservice

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 02:12 AM.


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