消费托管的iis Web服务 [英] Consuming hosted iis web services

查看:69
本文介绍了消费托管的iis Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我想知道如何在.net中使用托管的iis Web服务(打印pdf文件方法)
如果有人知道带有示例的帖子.
感谢U.

Hello every body
i want to know how to consuming hosted iis web service(print pdf file method) in .net
if any one know post with example.
Thank U.

推荐答案

通常,使用Web服务"的概念意味着充当服务的客户端/用户,并且不依赖于服务的方式托管或其他详细信息.重要的是URI,客户端使用的接口集和代理.

使用.NET客户端使用Web服务的基本步骤包括:
Normally, the notion "consuming a Web Service" means acting as a client/user of a Service, and it does not depend on how the Service is hosted or other detail. What does matter is the URI, the set of interfaces and a proxy used on the client side.

Basic steps of consuming a Web Service using .NET client include:

  • Obtain WSDL file(s) and documentation on how the Service(s) should be used.
    See http://en.wikipedia.org/wiki/WSDL[^]. The knowledge of WSDL language is not really required. A nice Web Server can provide downloading of the WSDL file(s) from the same site, but this is not required.
  • Run the .NET utility WSDL.EXE to generate a client proxy for a Web Service; if can be done using "Visual Studio Command Prompt" (http://msdn.microsoft.com/en-us/library/ms229859.aspx[^]).
    For description and command line parameters of this utility, see http://msdn.microsoft.com/en-us/library/7h3ystb6%28v=VS.100%29.aspx[^].
  • Parameters of WSDL.EXE include computer language to generate a proxy file, name space and output file name. When a source code proxy file with desired parameters is obtained, include it in your client project.
  • Instantiate the top-level object of a service using one of the constructors of the generated code. You may need to pass URI to the constructor or use the URL generated in the code of the proxy. In other cases, you may need to format a URI to set up authentication parameters (user name, password) to pass the parametrized URI to the constructor. This is a bad style, but some Services are like that.
  • Using your understanding of semantic of a particular Web Service taken from documentation and other sources, call the methods on the class instance(s) constructed on previous step.
  • PROFIT!


通常正常工作.


这篇关于消费托管的iis Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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