web stats
Response from WebService - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 12-13-2011, 06:16 AM
lchiner lchiner is offline
What's HL7?
 
Join Date: Mar 2009
Location: barcelona,spain
Posts: 4
lchiner
Default Response from WebService

I've a channel with WebService listener as a source and WebService sender as a destination, how I can return the response back to the caller, in my scenario I need to forward and ORL message to the caller that has previously send the OML
Is this possible or I need to create a new channel to synchronize request and response?

Thanks: LlorenÁ
Reply With Quote
  #2  
Old 12-19-2011, 02:44 AM
lchiner lchiner is offline
What's HL7?
 
Join Date: Mar 2009
Location: barcelona,spain
Posts: 4
lchiner
Default Solved

After trying and error a lot, finally I have resolve this issue, something that in all other integration products (commercial and many not commercial) is implicit, call a WebService and be able to process the answer

Here is my solution to this issue:
// get the response from my destination
var resp = responseMap.get('2WS');
// get the message part of the response
var axml = resp.getMessage();
// convert the message to XML
var msg = new XML(axml);
// Declare soap NS
var soap = new Namespace("http://schemas.xmlsoap.org/soap/envelope/");
// and finally extract the result from the message (in my scenario only one method
// processOrder returning a String and taking a String as a parameter)
logger.info(msg.soap::Body..*:rocessOrderRespons e..*:rocessOrderReturn);

// from there you can put this info in a variable and use it to respond from to the caller
// but as Kipling said "That's another story"
Reply With Quote
Reply

Tags
orl, response, 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 08:29 AM.


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