Access web service from GWT

自作多情 提交于 2020-01-02 04:47:11

问题


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.

Thanks and regards, Krt_Malta


回答1:


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

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.




回答2:


In our project we were using Axis Client to make SOAP Web Service Call(WSDL Driven). We had use the inbuild plug tool provided by the WTP/ AXIS Webservice in Spring Source Tool to create the client using provided WSDL. We had use the same client code to incorporate with GWT and everything works fine.



来源:https://stackoverflow.com/questions/2556294/access-web-service-from-gwt

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