无法从Web服务客户端实例化类 [英] Unable to instantiate a class from a web service client

查看:101
本文介绍了无法从Web服务客户端实例化类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在.wsdl文件的帮助下创建了一个Web服务客户端,之后我只是尝试实例化该服务中的类,但是没有获得该类的任何引用。



我尝试过:



我的代码中包含该服务的命名空间

喜欢

I have created a web service client with the help of .wsdl file and after that am just trying to instantiate the class which is in there in that service but am not getting any of references of that class.

What I have tried:

Am including the namespace of that serivice in my code
like

using ConsoleApplication11.ServiceReference1;



并期望从服务所以试图访问该课程,但没有运气。

所以任何人都可以引导我解决这个问题吗?

忘记了一件事。

i使用此 [ ^ ]只需右键单击打开的页面,即可保存带有.wsdl扩展名的文件。每一件事情都很顺利。#$>
我的.wsdl也有问题吗?


and expecting the availability of class from the service so trying to access that class but no luck there.
so can any one guide me with this issue?
forgot to mension one more thing.
i have tested the same scenario with this [^] am saving the file with .wsdl extention by simply right clicking on page in which it got open-up. and creating a client with this one and with this one every thing goes well.
so does my .wsdl has any issue?

推荐答案

请在此处查看答案:如何在c sharp应用程序中使用WSDL [ ^ ]

另请参阅:生成Web服务来自Visual Studio 2010 C#中的WSDL [ ^ ]

如果这没有帮助,您可以在不使用WSDL的情况下尝试:您的第一个C#Web服务 [ ^ ]
See the answers here: how to consume WSDL in c sharp application[^]
Also see: Generating a Web Service from WSDL in C# for Visual Studio 2010[^]
If that does not help, you can try without using WSDL: Your first C# Web Service[^]


这篇关于无法从Web服务客户端实例化类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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