web stats
Are Destination Mappings allowed in HTTP Sender URL - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-11-2010, 02:01 PM
TSmithTRA TSmithTRA is offline
OBX.2 Kenobi
 
Join Date: Nov 2009
Location: Winston-Salem, NC
Posts: 79
TSmithTRA is on a distinguished road
Default Are Destination Mappings allowed in HTTP Sender URL

Does anyone know if you can drag a destination variable into the URL box on an HTTP sender and it deploy and work? Any Help would be greatly appreciated.

Use case:

I have a string of Parameters I need to pass in the URL as a part of the POST. These need to be created dynamically for each message. I have a transformer step that builds the parameters and I am putting them into a Channel Mapped Variable. I am then putting that variable in at the end of the URL.

See Below:
http://10.207.255.100:80/servlet/actions/workflowStatusAPI${urlParams}

Transformer Step Build Post Variables:

var AmicasUser = 'mirth';
channelMap.put('AmicasUser',AmicasUser);
var AmicasPasswd = 'mirth';
channelMap.put('AmicasPasswd',AmicasPasswd);
var ActionType = 'setOrderStatus';
channelMap.put('ActionType',ActionType);
var MRN = $('patientid');
channelMap.put('MRN',MRN);
var StatusID = 'UR';
channelMap.put('StatusID',StatusID);
var Note = 'Mirth AutoUpdate to Unread';
channelMap.put('Note',Note);
var DimensionID = '0';
channelMap.put('DimensionID',DimensionID);

Transformer Step Build urlParameters:

var urlParams = '?amicasUsername=' + $('AmicasUser');
urlParams += '&password=' + $('AmicasPasswd');
urlParams += '&actionType=' + $('ActionType');
urlParams += '&mrn=' + $('MRN');
urlParams += '&acc=' + $('accession');
urlParams += '&statusID=' + $('StatusID');
urlParams += '&note=' + $('Note');
urlParams += '&dimID=' + $('DimensionID');
channelMap.put('urlParams',urlParams);
__________________
Tom Smith
IT Director
Triad Radiology Associates
Reply With Quote
  #2  
Old 08-11-2010, 02:07 PM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

I looked at both the 1.8.2 and 2.0 source code and it looks like both support variables in the url.
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
  #3  
Old 08-11-2010, 02:11 PM
TSmithTRA TSmithTRA is offline
OBX.2 Kenobi
 
Join Date: Nov 2009
Location: Winston-Salem, NC
Posts: 79
TSmithTRA is on a distinguished road
Default

I get these error messages when I try to deploy it with the variable at the end. Any Ideas?

[2010-08-11 17:10:16,925] ERROR (com.mirth.connect.server.controllers.MuleEngineCo ntroller:237): Failed to configure outbound router.
java.net.URISyntaxException: Illegal character in path at index 59: http://10.207.255.100:80/servlet/actions/workflowStatusAPI${urlParams}
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at com.mirth.connect.server.controllers.MuleEngineCon troller.configureOutboundRouter(MuleEngineControll er.java:350)
at com.mirth.connect.server.controllers.MuleEngineCon troller.registerChannel(MuleEngineController.java: 235)
at com.mirth.connect.server.controllers.MuleEngineCon troller.deployChannels(MuleEngineController.java:1 76)
at com.mirth.connect.server.Mirth.deployChannels(Mirt h.java:226)
at com.mirth.connect.server.Mirth.run(Mirth.java:134)

[2010-08-11 17:10:17,082] ERROR (com.mirth.connect.server.controllers.MuleEngineCo ntroller:604): Error unregistering channel component.
java.lang.ClassCastException: org.mule.routing.outbound.OutboundPassThroughRoute r cannot be cast to org.mule.routing.outbound.FilteringMulticastingRou ter
at org.mule.impl.model.AbstractModel.stopDispatchers( AbstractModel.java:441)
at org.mule.impl.model.AbstractModel.unregisterCompon ent(AbstractModel.java:209)
at com.mirth.connect.server.controllers.MuleEngineCon troller.unregisterChannel(MuleEngineController.jav a:602)
at com.mirth.connect.server.controllers.MuleEngineCon troller.deployChannels(MuleEngineController.java:1 95)
at com.mirth.connect.server.Mirth.deployChannels(Mirt h.java:226)
at com.mirth.connect.server.Mirth.run(Mirth.java:134)
__________________
Tom Smith
IT Director
Triad Radiology Associates
Reply With Quote
  #4  
Old 08-11-2010, 02:15 PM
TSmithTRA TSmithTRA is offline
OBX.2 Kenobi
 
Join Date: Nov 2009
Location: Winston-Salem, NC
Posts: 79
TSmithTRA is on a distinguished road
Default

I just verified that it deploys if I remove the ${urlParams}.

Mirth Connect Administrator 2.0.0.4865

Built on null

Server ID: 749d6078-fc1f-469a-9477-9b41d1864f10

Java version: 1.6.0_20

(c) 2005-2010 Mirth Corporation. All rights reserved. Visit http://www.mirthcorp.com

This product includes software developed by SymphonySoft Limited (http://www.symphonysoft.com) and its contributors.

This product includes software developed by the Apache Software Foundation (http://www.apache.org/).

This product includes all or a portion of the HL7 Vocabulary database, or is derived from the HL7 Vocabulary database, subject to a license from Health Level Seven, Inc.

This product includes a portion of images from http://www.famfamfam.com.
__________________
Tom Smith
IT Director
Triad Radiology Associates
Reply With Quote
  #5  
Old 08-12-2010, 09:47 AM
fforum fforum is offline
Mirth Newb
 
Join Date: Jul 2010
Posts: 6
fforum is on a distinguished road
Default

I am trying to do the same , but not sure how to test it

for example I am posting t he variables to :
http://localhost/test/test.php?id=''&name=''

How I can test if the variables are sent or not.


Thanks '
Reply With Quote
  #6  
Old 08-12-2010, 10:00 AM
TSmithTRA TSmithTRA is offline
OBX.2 Kenobi
 
Join Date: Nov 2009
Location: Winston-Salem, NC
Posts: 79
TSmithTRA is on a distinguished road
Default

You can set up an HTTP Listener to receive what the HTTP sender is sending. The variables will be in the incoming message. View messages on the listener channel and look under the raw message tab on the source.
__________________
Tom Smith
IT Director
Triad Radiology Associates
Reply With Quote
  #7  
Old 08-12-2010, 10:05 AM
fforum fforum is offline
Mirth Newb
 
Join Date: Jul 2010
Posts: 6
fforum is on a distinguished road
Default

my setup is as following:
one server has the Mirth connect with LLP listener , and as destination HTTP sender and Databse writer.

the scenario :
listen to incomeing messages, pasrse them in DB, and sent certian variables (like ID, name ...etc) to another web application living on a nother server .

The two servers are not on the same LAN.

Thanks
Reply With Quote
  #8  
Old 08-12-2010, 10:59 AM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

Quote:
Originally Posted by TSmithTRA View Post
I get these error messages when I try to deploy it with the variable at the end. Any Ideas?

[2010-08-11 17:10:16,925] ERROR (com.mirth.connect.server.controllers.MuleEngineCo ntroller:237): Failed to configure outbound router.
java.net.URISyntaxException: Illegal character in path at index 59: http://10.207.255.100:80/servlet/actions/workflowStatusAPI${urlParams}
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
at com.mirth.connect.server.controllers.MuleEngineCon troller.configureOutboundRouter(MuleEngineControll er.java:350)
at com.mirth.connect.server.controllers.MuleEngineCon troller.registerChannel(MuleEngineController.java: 235)
at com.mirth.connect.server.controllers.MuleEngineCon troller.deployChannels(MuleEngineController.java:1 76)
at com.mirth.connect.server.Mirth.deployChannels(Mirt h.java:226)
at com.mirth.connect.server.Mirth.run(Mirth.java:134)

[2010-08-11 17:10:17,082] ERROR (com.mirth.connect.server.controllers.MuleEngineCo ntroller:604): Error unregistering channel component.
java.lang.ClassCastException: org.mule.routing.outbound.OutboundPassThroughRoute r cannot be cast to org.mule.routing.outbound.FilteringMulticastingRou ter
at org.mule.impl.model.AbstractModel.stopDispatchers( AbstractModel.java:441)
at org.mule.impl.model.AbstractModel.unregisterCompon ent(AbstractModel.java:209)
at com.mirth.connect.server.controllers.MuleEngineCon troller.unregisterChannel(MuleEngineController.jav a:602)
at com.mirth.connect.server.controllers.MuleEngineCon troller.deployChannels(MuleEngineController.java:1 95)
at com.mirth.connect.server.Mirth.deployChannels(Mirt h.java:226)
at com.mirth.connect.server.Mirth.run(Mirth.java:134)
This bug must have been fixed after beta 2. I just tested it on the trunk and it worked for me. It looks like variables were still allowed in the beta, the channel just wouldn't deploy
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
  #9  
Old 08-12-2010, 12:02 PM
TSmithTRA TSmithTRA is offline
OBX.2 Kenobi
 
Join Date: Nov 2009
Location: Winston-Salem, NC
Posts: 79
TSmithTRA is on a distinguished road
Default

Is the other server a SOAP server or just listening for HTTP POST calls?

The solution would depend on the answer. You also need to make sure there is not a firewall between Mirth and the other server that may block messages.
__________________
Tom Smith
IT Director
Triad Radiology Associates
Reply With Quote
  #10  
Old 08-12-2010, 12:05 PM
fforum fforum is offline
Mirth Newb
 
Join Date: Jul 2010
Posts: 6
fforum is on a distinguished road
Default

Thanks fro replying,

It is just listening to HTTP POST calls, and NO fireWall.

What changes if there is a firewall?
Reply With Quote
Reply

Tags
http sender, url parameters

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 05:40 AM.


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