NetCFSvcUtil generated client ignore int and long attributes
I have problem with generated client for WCF service. Problem is that it ignores some fields when it converts request to soap. It only transfers string fields.
This is my class which needs to be transfered:
[DataContract]
public class PersonCriteria : CriteriaBase
{
[DataMember]
public long ID { get; set; }
[DataMember]
public string JMBG { get; set; }
[DataMember]
public string Fname { get; set; }
[DataMember]
public string Lname { get; set; }
[DataMember]
public long IdentityCardNumber { get; set; }
[DataMember]
public int DrivingCardNumber { get; set; }
}
And this is soap request:
{<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IPersonsService/GetPerson</Action>
</s:Header>
<s:Body>
<GetPerson xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<personReq>
<Criteria xmlns="http://schemas.datacontract.org/2004/07/Mibo.PoliceDemo.PersonsService.Messages.Requests">
<Fname xsi:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Mibo.PoliceDemo.PersonsService.Criteria" />
<JMBG xmlns="http:/开发者_开发技巧/schemas.datacontract.org/2004/07/Mibo.PoliceDemo.PersonsService.Criteria">1</JMBG>
<Lname xsi:nil="true" xmlns="http://schemas.datacontract.org/2004/07/Mibo.PoliceDemo.PersonsService.Criteria" />
</Criteria>
</personReq>
</GetPerson>
</s:Body>
</s:Envelope>}
I've tried to change some fields to string or int and it always transfers only string fields. I'am using netcfsvcutil for windows 7 (some update). What could be the problem?
精彩评论