This seems to be a common problem. The service metadata describes the data contract. That is, the structure of the exchanged data, without any validation information.
I have been solving this problem by implementing a validation layer on top of the service layer. It goes as follow:
In addition to a WSDL, the service author and consumer also agree on a refined XSD that describes all the validation details in addition to the mere structure of the data contracts.
Each party (xml) serializes and validates the data contracts against the refined XSD.
Sample "pseudocode" for a service method that validates the request agains an XSD.
public string MyServiceMethod(MyDataType m){
string s = XmlSerialize(m);
if( XSDValidate(s) ){
return ProcessRequest(m);
}else{
return BuildErrorResponse("The request is not compliant with the contract");
}
}
The service consumer can also implement a similar logic to validate the request data before sending it to the server.