从控制台应用程序调用Web服务动态 [英] Calling web services dynamically from a console application

查看:215
本文介绍了从控制台应用程序调用Web服务动态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用微软这个例子来调用Web服务动态使用反射:

I am using this example from microsoft to call web services dynamically using reflection:

http://blogs.msdn.com/b/kaevans/archive/2006/04/27/动态调用-A-Web的service.aspx

在哪一个网页的项目,做工精细然而,在一个控制台应用程序的类

Which works fine in a web page project, however in a console application the class

ServiceDescriptionImporter

不可用(犯规拿出在智能感知和心不是公认的组件的一部分属于 - System.Web.Services.Description)。这是奇怪的B / C它拿出在Web项目。

Is unavailable (doesnt come up in intellisense and isnt recognized as part of the assembly it belongs to -- System.Web.Services.Description). Which is wierd b/c it DOES come up in web projects.

任何人都知道这是为什么?我不能让控制台应用程序工作。这是一个VS 2010项目。

Anyone know why this is? I cannot get the console app to work. This is a VS 2010 project.

推荐答案

ServiceDescriptionImporter 是在System.Web.Services装配。再加上基准,并以使用System.Web.Services.Description导入命名空间; 语句,它会工作。

这篇关于从控制台应用程序调用Web服务动态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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