简体   繁体   中英

Get destinations response within mirth custom webservice

I've created successfully a custom web service for a source connector, ie, I can successfully call a method from that custom webservice a pass a message to the destinations of that channel something like this inside the webservice:

message="a XML message here";
RawMessage rawMessage = new RawMessage(message);

try {
     messageresult=receiver.processData(rawMessage);
    } catch (Exception e) {
       ...
        }

I need to return to webservice client the response of the source connector, which I've configured as to be autogenerated before processing on the source connector interface.

How can I do it?

Regards

The result message (not result message status) will appear in the return of the 'processData' method.

If you choose the response to be the postProcessor script in the source settings, and, have a postprocessor like this:

var r1=responseMap.get('Destination 1').getStatus();

return r1;

You'll get the response status as the response message.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM