【发布时间】:2014-08-08 20:28:18
【问题描述】:
我已经尝试了所有方法来运行 ws 两天,但我不能。我通过 wsimport (jaxws) 将 Web 服务生成为对象类。 (https://repservice.automatic.com.tr/automaticreport.asmx?wsdl)
在 Spring MVC 中我无法得到响应。
@RequestMapping(value = { "/", "/welcome**" }, method = RequestMethod.GET)
public String defaultPage(Model model) {
AutomaticReport service = new AutomaticReport();
Holder<Integer> getFletLimitResult = null;
Holder<String> result = null;
AutomaticReportSoap response = service.getAutomaticReportSoap();
response.getFletLimit("username", "password", "101732", getFletLimitResult, result);
System.out.println(getFletLimitResult+ " - " + result);
return "home";
}
【问题讨论】:
-
你在哪里设置你的网络服务连接参数?
-
正如我在示例中看到的 webservice 连接 url 已经添加到 automaticreport..class 中。其他参数正在由请求函数发送。
-
您是否尝试在 Spring 之外运行它...当您说您没有得到任何响应时,您是什么意思?一切都是空的吗?
-
是的,我做到了。 SoapUI 正确返回结果。 output 在 spring 中为 null。
标签: spring-mvc jax-ws wsimport