Hi, I am new to HTTP Post and encounter an strange issue. I have a request object defined as below:
[DataContract(Namespace = "http://Test.com/WCF")]
public class Request
{
[DataMember]
public string CardNumber { get; set; }
[DataMember]
public string CardExpDate { get; set; }
[DataMember]
public string AccountNumber { get; set; }
[DataMember]
public string NameOnCard { get; set; }
[DataMember]
public string CardVV2 { get; set; }
[DataMember]
public decimal PaidAmount { get; set; }
[DataMember]
public decimal ServiceFee { get; set; }
}
When I do a Http Post Action, only parts of the Parameters passed to the service.
My request header and body are like below:
User-Agent: Fiddler
Host: localhost:8832
Content-Length: 303
Content-Type: application/xml;charset=utf-8
<Request xmlns="http://Test.com/WCF">
<AccountNumber>6136307626</AccountNumber>
<NameOnCard>Test test</NameOnCard>
<CardNumber>4000202020202020</CardNumber>
<CardExpDate>11/11</CardExpDate>
<CardVV2>123</CardVV2>
<PaidAmount>30</PaidAmount>
<ServiceFee>1</ServiceFee>
</Request>
The values of CardNumber, CardExpDate and CardVV2 are always not paased to the service. Other fields are good.
Any help is highly appreciated. Thanks!