I will start off by saying I am new to wcf and rest. Here is the situation I have created a wcf service, the service returns an object(person) that contains fields and a collection of order objects. When I create an instance, the object and the collection of orders gets populated as expected
When I call the same service via rest call returning json see below, the code fails. if i remove the code where the object is populated, it works. the json shows and empty set of orders.
<OperationContract()> _
<WebGet(UriTemplate:="GetPerson/{user}", ResponseFormat:=WebMessageFormat.Json)> _
Function GetPerson(ByVal User As String) As Budget
The line that fails looks like this
lobjPerson.OrderList.Add(order)
Order list has been instantiated, and works, but not when called via rest call returning json
The error i get in the browser is “the error is kcferrorDomainWinsock:10054”. If i look at with web inspector I can’t seem to see an error. Hopefully this rings a bell for someone.
I fixed my problem from switching from arraylist to list(of t) for my collections. I am still pondering why this worked, can anyone explain this?. Second question remaining is how do you debug rest calls to wcf? anyone?