是否可以通过链接调用网络服务? [英] Is it possible to call a webservice via a link?

查看:45
本文介绍了是否可以通过链接调用网络服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网络服务,我需要通过链接来调用.该Web服务返回一个pdf文档,并将文档ID作为输入参数.

I have a webservice I need to call via a link. The webservice returns a pdf document and takes a document Id as a input parameter.

在通常情况下,我可以使链接在代码中调用一些代码,然后在代码后面依次调用Web服务.

Under normal circumstances I could have the link call some code in the code behind which in turn calls the webservice.

但是,最困难的部分是我无法在后面的代码中添加代码.原因是某些想知道要添加到页面上的链接的CMS用户,这些页面将下载PDF.我只能将链接添加到aspx页面.这有可能吗?

However the difficult part about it is I can't add code to the code behind. The reason is it is for some CMS users who want to know what links to add to the page which will download the pdfs. I can only add the link to the aspx page. Is this at all possible?

谢谢!

推荐答案

虽然可以通过链接调用Web服务(尽管很难添加参数),但听起来您想要做的事情是通用处理程序(在ASP.Net中,它是ASHX文件).

While it is possible to call a web service VIA a link (making it difficult to add parameters, though), it sounds like the thing you want to do is a generic handler (in ASP.Net, it is an ASHX file).

此处是使用方法的一个很好的例子.

Here is a good example of how to use one.

这篇关于是否可以通过链接调用网络服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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