web stats
Unable to Generate Dynamic Response Content Type in HTTP Listener - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2015, 11:49 AM
ohollarens ohollarens is offline
Mirth Newb
 
Join Date: Mar 2013
Posts: 15
ohollarens is on a distinguished road
Question Unable to Generate Dynamic Response Content Type in HTTP Listener

Hi there,

I'm currently using an HTTP listener to basically pretend to be a full fledged SOAP service. This requires parsing through the message to grab out some values and craft a dynamically generated "ContentType" HTTP header for my response. From this forum post, it sounds like it's possible to put a variable onto the response or channel map in the source transform and just reference it in the HTTP listener's "Response Content Type" (e.g. ${contentType}).



This seems like it's almost working as long as I put the contentType variable in the globalMap, but I'm still having issues. It seems like Mirth is doing some kind of evaluation or splitting on the string variable that I reference inside the Response Content Type box instead of just accepting it as provided. I'm attempting to pass this in:

Code:
multipart/related;type="application/xop+xml";start="<http://example.org>";boundary="91fe6274-2b43-461a-aab7-b0335bfbcdb4";start-info="application/soap+xml"
but Mirth seems to be parsing that string and ends up only keeping "multipart/related" and ditching the rest. Is there a way to get it to just trust the string I'm passing to it instead of attempting to evaluate it?

I'm on Mirth 3.2.1.7650. I'll attach the channel XML as well.

Thanks for the help
Attached Files
File Type: xml HTTPListenerSOAPResponse.xml (94.1 KB, 40 views)

Last edited by ohollarens; 05-20-2015 at 09:19 AM.
Reply With Quote
  #2  
Old 05-20-2015, 09:20 AM
ohollarens ohollarens is offline
Mirth Newb
 
Join Date: Mar 2013
Posts: 15
ohollarens is on a distinguished road
Default

If anyone's able to offer some insight into this, I'd really appreciate it. Please let me know if I can offer any more information.

Last edited by ohollarens; 05-20-2015 at 02:32 PM.
Reply With Quote
  #3  
Old 05-20-2015, 12:24 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,099
narupley is on a distinguished road
Default

This appears to be a couple of bugs, which I've created an issues for: MIRTH-3718, MIRTH-3719

In the meantime it should still work if you put that variable in the global channel map instead, and then specifically include the charset parameter, like this:

Code:
multipart/related;type="application/xop+xml";start="<http://example.org>";boundary="91fe6274-2b43-461a-aab7-b0335bfbcdb4";start-info="application/soap+xml";charset="UTF-8"
__________________
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
  #4  
Old 05-20-2015, 02:11 PM
ohollarens ohollarens is offline
Mirth Newb
 
Join Date: Mar 2013
Posts: 15
ohollarens is on a distinguished road
Default

That works like a charm. Thanks again for your help!
Reply With Quote
Reply

Tags
channel map, contenttype, http, response, response map

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 10:55 AM.


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