calling a java webservice from html page and javascript

时间秒杀一切 提交于 2020-01-02 05:20:33

问题


I'm trying to call a java implemented web service (using the NetBeans IDE) from javascript. I have read a lot about jQuery and AJAX but i cant seem to get a hand on it.

suppose my web service WSDL is found at: http://localhost:8080/MICE_Server/MapEditorService?WSDL

web method name : sayHello(String name) which returns a string.

how would i be able to to this in javascript?

thanks in advance for ur help!!


回答1:


If you are using JQuery, there is a SOAP client plugin that you might be interested in.

Also, you may want to see this related question. This answer may be especially helpful for you.




回答2:


Unless you have to use jQuery, I think it might be easier to just use DWR here. You can call the webservice method from the DWR backend method which can be invoked from a java script. It's pretty easy to set up. They have a good collection of tutorials on their website as well.




回答3:


Try taking a look at this article. It provides a nice walk through and explanation.



来源:https://stackoverflow.com/questions/2675776/calling-a-java-webservice-from-html-page-and-javascript

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