当前位置: 动力学知识库 > 问答 > 编程问答 >

wcf - DataMember return null

问题描述:

I use SoapUI to test my web service. The point is that is not taking the value of some tag, i.e,

<con:customerLastName>Smith</con:customerLastName>

<con:customerFirstName>John</con:customerFirstName>

I don't know reason but alway DataMember customerFirstName return null

My contract.cs

[DataContract]

public class recordParameter

{

[DataMember(EmitDefaultValue = false)]

public string customerLastName { get; set; }

[DataMember(EmitDefaultValue = false)]

public string customerFirstName { get; set; }

}

My ws.cs

case "customerData":

if (!String.IsNullOrEmpty(request.parameters.record.customerLastName) && !String.IsNullOrEmpty(request.parameters.record.customerFirstName)){

分享给朋友:
您可能感兴趣的文章:
随机阅读: