I’m having trouble to understand the situation which Is :
The Host has a service which has operationMethods
for example Calc (Myclass a)
MyClass contains 2 properties ( prop1 , prop2)
Now , the clients also whould know about MyClass via proxy and should know also contract by reference.
So when the client creates new instance of MyClass (to send it)- how can one prop can be missing ???
when he instancing new MyClass – both prop are initialized (null or what ever). so why do i need the isRequired ?
Theres no guarantee as to what language or how they are formulating their soap request, so the way they are generating it may not use a generated class that contains the property. Is required requires that is present in the message
Interaction with IsRequired
As discussed in Data Contract Versioning, the DataMemberAttribute attribute has an IsRequired property (the default is false). The property indicates whether a given data member must be present in the serialized data when it is being deserialized. If IsRequired is set to true, (which indicates that a value must be present) and EmitDefaultValue is set to false (indicating that the value must not be present if it is set to its default value), default values for this data member cannot be serialized because the results would be contradictory. If such a data member is set to its default value (usually null or zero) and a serialization is attempted, a SerializationException is thrown.