Announcement

Collapse
No announcement yet.

HTTP Sender reponse?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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.

    Comment


    • #3
      got it. thanks!

      Comment

      Working...
      X