有什么方法可以使用它的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服务
发布评论