动态添加服务引用 [英] Add Service reference dynamically

查看:100
本文介绍了动态添加服务引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello all
I have made web service to connect with Sales Force Application , and I want to use  data of  sales force application into my application, and I wan to add reference to this web service by C# code,not from menu items ,like add web reference/Service reference , please if any body get what I mean and can help me please send me or tell me about some url may help me in doing that
Regards& Thanks 
Sandeep Verma 
Sr.Web developer 
at SvimTech Software Pvt. Ltd. 
Mohali Punjab

推荐答案

不,您无法在运行时添加Web引用。添加Web引用会创建几个允许您与Web服务交互的类;这些类需要先编译才能使用。



如果你想动态支持不同类型的Web服务,他们必须使用一致的界面一组类可以使用Web服务。否则,您将必须实现查询Web服务定义的内容,并为用户创建某种用户界面,以输入需要访问Web服务的数据。



请到这里你可以获得更多的信息



http://social.msdn.microsoft.com/Forums/vstudio/en-US/39138d08 -aa08-4c0c-9a58-0eb81a672f54 /在运行时动态添加网络参考 [ ^ ]
No, you can not add a web reference at runtime. Adding a web reference creates several classes that allow you to interface with the web service; those classes need to be compiled before they can be used.

If you want to dynamically support different types of web services, they'll have to use an consistent interface so that a single set of classes can use the web services. Otherwise, you'll have to implement something that queries the web service's definition and creates some sort of user interface for the user to enter the data that needs to get to the web service.

Please go here you can get more some information

http://social.msdn.microsoft.com/Forums/vstudio/en-US/39138d08-aa08-4c0c-9a58-0eb81a672f54/adding-a-web-reference-dynamically-at-runtime[^]


这篇关于动态添加服务引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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