Ok so i created a new wcf data service, removed the inherits dataservice reference and initializeservice sub.
javascript:
vname.push( { frmid: "test", frmval: "1111" })
$.ajax({
url: "MyWCFDataService.svc/SendItems",
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: { JSON.stringify(vname) },
success: function () {
alert("success :-)");
},
error: function () {
alert("fail :-(");
}
});
service:
Public Class tobject
Public Property frmid As String
Public Property frmval As String
End Class
<OperationContract>
<WebInvoke(ResponseFormat:=WebMessageFormat.Json, RequestFormat:=WebMessageFormat.Json)> _
Public Function SendItems(anyobjectname As List(Of tacosobjectitem)) As Boolean
Return True
End Function
This now turns the anyobjectname into a list of my object. I cant understand why i couldnt use BodyStyle:- Wrapped but it works so im happy. Hope it helps someone out there.