Mirth Connect: javascript to call a webservice

廉价感情. 提交于 2019-12-06 08:36:58

Answer:

  • Auto-generate service client proxy with Axis WDSL2Jave tool
  • Build a JAR archive with the auto-generated classes
  • Copy the JAR file in %MirthInstallPath%/lib/custom
  • Re-start Mirth service
  • Create a transformer JavaScript with the following code (in this example the WS is called Service1, a sample WS coded with .NET):
var locator = new Service1Locator();
var wsdlURL = new URL('http://localhost:8731/Design_Time_Addresses/HelloWorldWS/Service1'));
var proxy = locator.getBasicHttpBinding_IService1(wsdlURL);
var result = proxy.sayHello("John Doe");
// use result to whatever message mapping you need to perform

That's all.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!