There is an issue I am going through when generating Proxy code for my WCF services. Whenever I generate Proxy code for services with methods having VALUE Type parameters, additional BOOL parameter <parameter>Specified is added to the generate Proxy
So if I have method - Employee GetEmployee(int Id), the respective proxy code for this method will be - Employee GetEmployee(int Id, bool IdSpecified).
Moreover, if you do not set this bool parameter value to TRUE, no value will be passed to the End service.
I can understand this can come handy when handling Null inputs, but that will not be always the case.
After doing some R&D, I found that if I add Data Format attribute of type RPC to my Method contract, these parameters are removed. Like if I add:
[DataContractFormat(Style = OperationFormatStyle.Rpc)] , the generated proxy code reflects all value type parameters as is.
I am not an expert in WCF, and for the same reason I don't have much idea on what significance this attribute plays for the service methods. Can adding this attribute introduce problems when consuming these methods by application in .NET 1.1 or in JAVA?
Can anyone help me in getting ride of this additional parameter in the proxy?
Thanks in Advance.
View Complete Post