C#Web服务选择问题 [英] C# Web Service Choice Problem

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

问题描述



首先让我提一下,我在Web服务模型方面没有太多经验。

我有一个C#.net客户端应用程序(一个Windows应用程序) )需要使用基于Java的Web服务。我的客户端应用程序适用于大多数Web服务,但是多个WS调用根据输入集和/或基于服务器从其数据库中提取的数据返回不同类型的结果。

当Web服务返回一些属性为null和一些填充,我的客户端应用程序在WS调用失败并且引发错误。我无法控制Web服务,但我只是在使用它们。如果不在服务器端进行任何配置更改,是否有办法更改我的客户端应用程序以处理多个响应选择?

感谢
duke

解决方案

运气好吗?

我真的对这种行为感到困惑。有人说C#天生就无法处理选择,但我不相信。

非常感谢你们的帮助。

感谢你们杜克大学>

Hi,

First of all let me mention that I dont have much experience in Web Services models.

I have a C#.net client application (a windows application) that needs to consume a java based web service. My client app works fine for most of the web services but several WS calls return different types of results based on the set of inputs and/or based on the data the server pulls from its database.

When the web service returns some properties as null and some populated, my client application fails at the WS call and thorows an error. I have no control over the web services but am only consuming them. Without doing any configuration changes in server side, is there a way to change my client application to handle multiple response choices?

Thanks
Duke

解决方案

Any luck guys?

I'm really puzlled with this behaviour. Some say C# is inherently incapable of handling Choices, but I don't believe that.

Your help is very much appreciated.

Thanks
Duke


这篇关于C#Web服务选择问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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