简体   繁体   English

WCF更改属性可设置为nil

[英]WCF change attribute nillable to nil

我在Visual Studio中使用c#开发了WS和WSDL,WSDL包含nillable =“ true”,但是客户端不支持,如何将nillable =“ true”更改为xsi:nil =“ true”。

You are confusing the XSD schema nillable attaribute with the XSD schema-instance nil attribute. 您正在将XSD模式可设置的附件与XSD schema-instance nil属性混淆。 They are linked, but not equivalent. 它们是链接的,但不等同。

Please see http://www.w3.org/TR/xmlschema-0/#Nils for clarity. 为了清楚起见,请参见http://www.w3.org/TR/xmlschema-0/#Nils

The XSD schema nillable attribute is a decorator on the element to allow an explicit null value to be assigned to the element in conforming XML documents. XSD模式nillable属性是元素上的装饰器,以允许在符合XML规范的文档中将显式的null值分配给元素。

The XSD schema instance nil attribute is the way to define an explicit null value in a XML document. XSD模式实例的nil属性是在XML文档中定义显式null值的方法。

the WSDL contains nillable="true", but the client does not support WSDL包含nillable =“ true”,但是客户端不支持

You need to explain exactly what you mean by this. 您需要确切解释您的意思。 Is the client unable to consume the WSDL from your service? 客户端是否无法使用您服务中的WSDL? What is the error they are getting? 他们得到的错误是什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM