从GWT访问Web服务 [英] Access web service from GWT

查看:86
本文介绍了从GWT访问Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以使用它的WSDL从GWT访问Web服务?以前我试图使用ws-import ....生成的类,但后来有人向我指出,GWT无法处理所有的Java,只是它的一个子集,因此它不会理解ws-import类。

Is there any way how I can access a web service from GWT using its WSDL? Previously I was trying to use the generated classes from ws-import.... but then someone pointed out to me that GWT cannot handle all Java, just a subset of it, hence it won't understand the ws-import classes.

感谢和问候,
Krt_Malta

Thanks and regards, Krt_Malta

推荐答案

GWT可以使用 RequestBuilder ,它会对服务进行HTTP调用,然后访问其响应。

GWT can access web services using a RequestBuilder, which makes HTTP calls to a service and then gets access to its response.

由于您的Web服务正在使用SOAP,因此您得到的响应在您的RequestBuilder的回调中将是XML。解析XML以找到您感兴趣的信息,并且您可以轻松前往。

Since your web service is using SOAP, the response you get in your RequestBuilder's callback will be XML. Parse that XML to find the information you're interested in, and you're good to go.

这篇关于从GWT访问Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆