wsdl.exe和可选的Web服务参数 [英] wsdl.exe and optional web service parameters

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

问题描述


这篇文章不是关于asmx,而是关于wsdl.exe和Jax。如果这不是发布的正确论坛,我很抱歉。

我正在为使用Jax创建的soap服务编写C#客户端。该服务公开一个具有boolean作为参数的方法。布尔值是可选的(minoccurs = 0)。如果布尔值为true或false,则返回结果集的一个或另一部分。如果在SOAP请求中省略了布尔值,则返回整个结果集。这似乎是来自Web服务部分的有效行为,是不是?

现在我的问题是使用wsdl.exe生成的代码不允许使用可选的布尔值。有没有办法使用wsdl.exe?有没有办法通过扩展生成的代码?一个可以为空的布尔可以以某种方式成为一个解决方案吗?

任何帮助都表示赞赏,提前谢谢。

保罗。

解决方案

< blockquote>

你还没有说过你正在使用哪个版本的.NET框架。



另外,请将问题缩小到有问题的方法,并发布一个只有一个操作的WSDL以及重现问题所需的任何其他内容。



也就是说,已知.NET 1.1在这方面存在问题,五年后这些问题似乎不会得到解决。


< p align = left>



This post is not about asmx but about wsdl.exe and Jax. I am sorry if this is not the right forum to post.

I am writing a C# client for a soap service created with Jax. The service exposes a method that has a boolean as argument. The boolean is optional (minoccurs=0). If the boolean is true or false one or the other part of a result set is returned. If the boolean is omitted in the soap request the whole result set is returned. This seems valid behavior from the part of the web service, is it not?

Now my problem is that the code generated with wsdl.exe does not allow for an optional boolean. Is there a way around this using wsdl.exe? Is there a way around it by extending the generated code? Could a nullable boolean be a solution somehow?

Any help is appreciated, thanks in advance.

Paul.

解决方案

You haven't said which version of the .NET framework you're using.

 

Also, please narrow the problem down to the offending method and post a WSDL that only has the one operation and anything else necessary to reproduce the problem.

 

That said, .NET 1.1 is known to have problems in this area, and it doesn't seem likely that those problems will be fixed, five years later.

 


这篇关于wsdl.exe和可选的Web服务参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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