How to specify list parameters in WCF test client (WcfTestClient.exe)?

I use the WCF test client (WcfTestClient.exe) to test one of my wcf services. I have a message contract that has a list of DataContracts like: The contract for my message is as follows:

[MessageContract] public class UpdateInvoiceStatusesRequest { private List<InvoiceStatusHistory> _invoiceStatusHistory; [MessageBodyMember(Order = 0)] public List<InvoiceStatusHistory> InvoiceStatusHistory { get { return _invoiceStatusHistory; } set { _invoiceStatusHistory = value; } } } 

and my data contract:

 [DataContract] public class InvoiceStatusHistory { private int _invoiceId; private int _status; private string _comment; private string _timeStamp; [DataMember] public int InvoiceId { get { return _invoiceId; } set { _invoiceId = value; } } [DataMember] public string Comment { get { return _comment; } set { _comment= value; } } [DataMember] public int Status { get { return _status; } set { _status = value; } } [DataMember] public string TimeStamp { get { return _timeStamp; } set { _timeStamp = value; } } } 

when I use WcfTestClient.exe to check the service with the UpdateInvoiceStatusesRequest message UpdateInvoiceStatusesRequest , it shows the InvoiceStatusHistory value as length = 0, now I don’t know how to add InvoiceStatusHistory objects to the List<InvoiceStatusHistory> ? Does anyone know about this, please help me?

+47
wcf
Nov 24 '09 at 6:26
source share
1 answer

Enter length=1 in the field. A + sign appears next to the query parameter name. Click on it, then on the [0] node, which points to the first element in the array and sets its values ​​as usual.

+132
Nov 24 '09 at 6:36
source share



All Articles