default value in web service wsdl in asp.net
I created on wcf web service and trying to test with SOAP UI. When testing with soap ui for example creating an employee, if I send soap request xml with
<empId>0</e开发者_运维问答mpId> works fine.
<empId></empId> **throwing exception.**
if i completly remove <empId> tag it works fine....
Is there any way to make default value as "0" in wsdl in WCF?
nRk
After googling more i am able find the solution like this. in class for the properties you need to specify an Attribute like the below
[System.ComponentModel.DefaultValue(0)]
public int EmpId
{
get;set;
}
following link help me in finding the solution :
http://weblogs.asp.net/pgreborio/archive/2004/01/16/59360.aspx
nRk
精彩评论