views:

50

answers:

1

Hi, 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</empId> 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?

Thanks nRk

A: 

Hi,
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

Thanks
nRk

nRk