WCF WSDL + Nillable Attributes

前端 未结 2 1434
后悔当初
后悔当初 2021-01-23 17:52

I have a WCF service with a Flattened WSDL, and the consumer at the other end is telling me the nillable=\"true\" attributes are hosing them up. I tried setting EmitDefaultValue

2条回答
  •  离开以前
    2021-01-23 18:36

    There's no direct simple way to achieve this. You'll have to use WsdlExporter to implement it yourself. Whether it will have unintended consequences depends on your intentions :-)

    EDIT:

    Have a look at the MSDN example of IWSDLExportExtension. It will allow you to do exactly what you want. Admittedly, it's a bit of a hassle to get it right, but you're looking in the right direction.

提交回复
热议问题