3
votes

I've noticed that the WCF proxy generator is not generating the "specified" property flags for string fields

EG When I have two fields on a complexType specified in the WSDL:

<xs:element name="testStringField" type="xs:string" minOccurs="0" /> 
<xs:element name="testDecimalField" type="xs:decimal" minOccurs="0" /> 

the proxy generator will create these properties on the class for the complexType:

testStringField
testDecimalField
testDecimalFieldSpecified

Why no *Specified property for strings? How can I get svcutil to generate this?

1

1 Answers

4
votes

Ok, I'm being dumb. This is obviously because string is a reference type so there is no need to specify whether is included because the testStringField can be set to null, whereas testDecimalField cannot, hence the need for a testDecimalFieldSpecified flag.