如何使用cxf在mulesoft中公开异步soap Web服务

时间:2015-12-29 14:23:44

标签: web-services mule cxf

我已经使用mulesoft中的cxf公开了soap web服务,这是我的界面和java代码。

界面是:

@WebService
public interface HelloWorld {
 String sayHi(String text);
 }

java类是:

@WebService(endpointInterface = "demo.HelloWorld",
serviceName = "HelloWorld")
 public class HelloWorldImpl implements HelloWorld {
   public String sayHi(String text) {
  /*
   Here i am writing the logic which is takes the 15 seconds
   and i do not want that caller webservices must be wait to finish
   this process.

  */

return "Hello " + text;
  }
}

当前调用者正在等待完成所有逻辑 sayHI()方法,但我想以异步方式做,这意味着sayHi()方法连续进程,调用者不等待响应。那么任何想法如何在mulesoft中实现?。

这是mule soft中的参考: https://docs.mulesoft.com/mule-user-guide/v/3.7/building-web-services-with-cxf

1 个答案:

答案 0 :(得分:0)