Export (0) Print
Expand All

Omitting Values for Optional Web Service Objects

Properties of several of the Report Server Web service complex types have an accompanying property known as the Specified property. The name of the property consists of the original property name with the word "Specified" appended to it. The presence of this property indicates that a value for the original property may sometimes be omitted. This is a direct result of the translation from the Web Service Description Language (WSDL) to a .NET Framework proxy class. For example, the Web service property Enabled of the complex type DataSourceDefinition has an accompanying property named EnabledSpecified. If you are building an application and do not want to set a value for the Enabled property, you do not have to supply a value for Enabled; the default value of true is used. However, you still need to set EnabledSpecified to false. If you supply a value for the Enabled property, you need to set EnabledSpecified equal to true. This is the case for writable properties. For read-only properties, you do not need to take any action.

Important noteImportant

Failure to specify a property using the above-mentioned technique can result in unpredictable Web service behavior.

The data types that usually require you to handle the additional Specified property are Boolean, DateTime, and Enumeration.

For an example, see CreateDataSource method.

Community Additions

ADD
Show:
© 2014 Microsoft