Default value in wsdl web service in asp.net
I created a wcf webservice and tried to test it using SOAP interface. When testing with soap ui, for example to create an employee, if I send a soap xml request with
<empId>0</empId> works fine.
<empId></empId> **throwing exception.**
if i completly remove <empId> tag it works fine....
Is there a way to make the default "0" in wsdl in WCF?
NRK
+2
a source to share
1 answer
After googling more, I can find a solution similar to this. in the class for the properties needed to specify the attribute as shown below
[System.ComponentModel.DefaultValue(0)]
public int EmpId
{
get;set;
}
the following link will help me find a solution:
http://weblogs.asp.net/pgreborio/archive/2004/01/16/59360.aspx
NRK
+1
a source to share