从ASP页面向Web服务传递参数 [英] passing parameters to a web service from a asp page

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

问题描述

您好,我需要一些帮助来创建一个调用Web服务的ASP页面.请原谅我,我是新来的.
这是场景从我们的一个应用程序中,我将调用一个asp页面,如下所示:http://localhost/allscript.asp?acctnum = 12345& mrn = 6789
在页面(allscripts.asp)中,我知道可以使用字符串acct = Request ["acctnum"]字符串MRN = Request ["mrn"]等检索入站值. 然后,我想将这两个值传递给我在本地主机上创建的名为"edChartlink"的Web服务,该服务在输入上述信息后将返回一个url.收到该网址后,我将其称为该网址.
我不太确定如何从asp页面调用Web服务并将参数传递给它.
有人知道我可以参考的文章或我可以查看的示例代码吗?我在Google上找不到很多.
再次感谢,感谢您能提供的任何宝贵意见.
Jose''

Hi I need some help creating a asp page that calls a web service. Please forgive me I''m new at this thanks.
This is the scenario From one of our applications I will call an asp page as follows http://localhost/allscript.asp?acctnum=12345&mrn=6789
in the page (allscripts.asp) I know I can retrieve the inbound values by using string acct=Request["acctnum"] string MRN=Request["mrn"] etc..
Then I want to pass these two values to a web service I created on the localhost called "edChartlink" which will return a url after encryting the above information. Once I recieve the url I''ll call that url.
I''m not quite sure how to call the web service from the asp page and pass it the parameters.
Does anybody know of an article I can reference or an example code I can view. I can''t find much on google.
Thanks again and I appreciate any input I can get.
Jose''

推荐答案

这应该可以帮助您入门
http://www.w3schools.com/webservices/ws_example.asp
This should help you get started
http://www.w3schools.com/webservices/ws_example.asp


高级步骤:
1.具有对您的项目的Web服务引用.
2.在需要时创建Web服务对象
3.调用使用webservice对象展开的webmethod
4.按照定义将参数传递给方法.

如果您仍然需要一篇文章,那么只需Google即可在Web应用程序中使用Web服务.
High-level Steps:
1. Have a webservice reference to your project.
2. Create webservice object when needed
3. Call the webmethod exposded using the webservice object
4. Pass the parameters to the method as per defined.

If you still need an article then just Google for consuming webservice in a web application.


这篇关于从ASP页面向Web服务传递参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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