如何在应用程序网站中使用Web服务 [英] how to use a web service in an application web

查看:135
本文介绍了如何在应用程序网站中使用Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我使用OpenLayers和GeoExt开发应用程序网站.我创建了一个页面,其中包含我的图层和图层基础.我想在我的应用程序中添加搜索和行程,因此我创建了必须在其中放置信息的面板.
我的老板为我提供了搜索和行程的Web服务,并希望我将它们添加到我的应用程序中.他给我的确切是Web服务的URL.我的问题是如何使用这些url(Web服务)以及如何将它们添加到我的应用程序中.我进行了一些搜索,发现我必须使用ajax的post methode,但是我不知道如何使用它.

我正在使用NetBeans进行测试,并且使用HTML和JavaScript.

谢谢您的帮助.

Hey everybody

I develop an application web using OpenLayers and GeoExt. I created a page that contains my layers and the layer base. I want to add search and itinerary to my application so i created the panels where i have to put my informations.!

My boss gave me web service of search and itinerary and want me to add them to my application. What he gave me exactly are url of the web service. My question is how to use these url (web service) and how to add them to my application. I do some search and i found that i have to use a post methode of ajax but i have any idea how to use it.

I''m doing my test with NetBeans and i worked using HTML and JavaScript.

Thank you for your help.

推荐答案

由于您需要纯JavaScript(无服务器端)解决方案,因此我建议学习使用jQuery调用...
从此处开始:将jQuery与Web服务一起使用的介绍 [ ^ ]
As you need pure JavaScript (no server side) solution I suggest to learn using jQuery calls...
Start here: Introduction to using jQuery with Web Services[^]


步骤1.右键单击参考
第2步.点击服务参考
第三步.点击高级,然后选择底部的添加网络参考
第四步.粘贴我们的参考文献,然后单击go并发现
第五步.将发现的服务添加到您的项目中
step1. right click on the reference
step2. click on service reference
step3. click on advanced and then select add web reference at the bottom
step4. paste the we reference and click on go and discover
step5. add the discovered service to your project


这篇关于如何在应用程序网站中使用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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