web stats
Configuration Map in a custom Webservice - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2016, 03:10 AM
grodriguez grodriguez is offline
Mirth Newb
 
Join Date: Sep 2012
Posts: 17
grodriguez is on a distinguished road
Default Configuration Map in a custom Webservice

Hi all,

i have a Webservice Listener that uses a custom webservice, just as described in the Wiki. Works great, but i would like to know if i can access the configurationMap in order to read some environment variables from inside the code of the webservice. In the channels it's of course an implicit object, but i guess it can be retrieved somehow. Any ideas?

Thx very much!
Reply With Quote
  #2  
Old 08-17-2016, 07:23 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Yep, that should be possible. Call out to the configuration controller to get that info.
__________________
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 08-22-2016, 04:23 AM
grodriguez grodriguez is offline
Mirth Newb
 
Join Date: Sep 2012
Posts: 17
grodriguez is on a distinguished road
Default

Thx very much, Nick, that was it. Just for anyone else who needs the same thing:

1.- include the mirth_server.jar dependency in your project
2.- import com.mirth.connect.server.controllers.Configuration Controller
3.- ConfigurationController.getInstance ().getConfigurationMap () contains the Map that you need
Reply With Quote
Reply

Tags
configurationmap, custom 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 07:22 AM.


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