web stats
Custom Web Service Listener - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-06-2012, 11:51 AM
tibbscp17 tibbscp17 is offline
OBX.2 Kenobi
 
Join Date: Jun 2010
Posts: 60
tibbscp17 is on a distinguished road
Default Custom Web Service Listener

I want to know if there is anyway to have a custom response to the web service listener, based on the results of the destinations of the channel.

I am creating a channel with source that is a web service listener, which is a custom web service. I take the parameters that passed to the web service to create a HL7 message. The I want to send the HL7 message via LLP to another channel (HL7Engine). I want to process the response, and based on it I want to send a custom response to the application that send the soap request to the channel.
Reply With Quote
  #2  
Old 09-06-2012, 04:26 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

Yep; in the source connector you can "Respond From" a custom response variable. The most common way this is done is by creating a Response object in your postprocessor and placing it in the response map with responseMap.put. Check the References tab; there are several templates that will help you.
__________________
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 09-07-2012, 08:26 AM
tibbscp17 tibbscp17 is offline
OBX.2 Kenobi
 
Join Date: Jun 2010
Posts: 60
tibbscp17 is on a distinguished road
Default

Thanks. I am getting the following error and I am not sure why.
I am attaching the error as well as the simple channel.
Attached Files
File Type: xml Testing.xml (6.4 KB, 42 views)
File Type: txt Error.txt (16.6 KB, 14 views)
Reply With Quote
  #4  
Old 09-07-2012, 11:10 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

That looks like a problem with the specific inbound message that you're using; it's probably malformed somehow. Also, your destination is converting HL7 v2.x to Delimited Text without any transformation, so that could be causing errors as well.
__________________
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
  #5  
Old 09-07-2012, 12:27 PM
tibbscp17 tibbscp17 is offline
OBX.2 Kenobi
 
Join Date: Jun 2010
Posts: 60
tibbscp17 is on a distinguished road
Default

I am not sure about what data type to use. I want to pass in a string to use and then send back a string. What data type should I use ?
Reply With Quote
Reply

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 06:41 AM.


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