开发者

How to make a parameter optional in WSDL?

开发者 https://www.devze.com 2022-12-24 22:26 出处:网络
I have a WebService API which needs 2 of its parameters to be optional in the WSDL public wsProxy[] Insert(wsProxy[] proxies, string loginname, string password, bool returnNewData)

I have a WebService API which needs 2 of its parameters to be optional in the WSDL

public wsProxy[] Insert(wsProxy[] proxies, string loginname, string password, bool returnNewData)
{
  //code here
}

I need to a way to show loginname and password as optional in the WSDL.

Is there any way to do this in C#. Can I maybe add an tag in front of the parameters like this [optional]loginname?

I have been looking around but haven't been ab开发者_JS百科le to find anything so far.


They will, by default, appear as optional in the WSDL generated by WCF (let me know if you know of a way to disable this horrid behavior).

0

精彩评论

暂无评论...
验证码 换一张
取 消