从Visual Studio调用Web服务给出空结果 [英] Call webservice from Visual Studio gives null result

查看:87
本文介绍了从Visual Studio调用Web服务给出空结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio编写一个c#控制台应用程序来调用几个外部Web服务.

Hi, I am using Visual Studio to write a c# console app to call a couple of external webservices.

我可以通过Visual Studio生成Web服务的代理(每个代理都有一个方法).

I can generate the proxies to the webservices (which each have one method) via Visual Studio.

我可以调用WebService1并获取结果.

I can call WebService1, and obtain results.

但是,当我调用WebService2时,我得到一个空返回值.我可以通过"Fidler"查看该Web服务实际上确实返回了一个值,但是由于某种原因,Visual Studio生成的代码向我返回了null.

However, when I call WebService2, I get a null return value. I can see via "Fidler" that the webservice does in fact return a value, but for some reason, the Visual Studio generated code returns null to me.

这是Visual Studio中的错误吗?更重要的是,我该如何解决?

Is this a bug in Visual Studio - and more importantly, how do I work around it?

谢谢

彼得

推荐答案

你好

从Windows资源管理器运行控制台应用程序时会发生什么?

What happens when running the console app from Windows Explorer?

此外,您可能希望共享有关该服务和代码的更多信息,从而为阅读您的问题的人画一幅画. 

Also, you might want to share more information about the service and code along with this which will paint a picture for those reading your question. 


这篇关于从Visual Studio调用Web服务给出空结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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