阅读背景:

从目标c调用asp.net webservice以使用参数返回JSON格式的数据

来源:互联网 
<ServiceContract()> _
Public Interface IGetEmployees
 <OperationContract()> _
<WebInvoke(Method:="GET", ResponseFormat:=WebMessageFormat.Json,BodyStyle:=WebMessageBodyStyle.Wrapped, UriTemplate:="json/contactoptions/?strCustomerID={strCustomerID}")> _
Function GetAllContactsMethod(strCustomerID As String) As List(Of NContactNames)
End Interface

   <WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
Public Function GetAllContactsMethod(strCustomerID As String) As List(Of NContactNames) Implements IGetEmployees.GetAllContactsMethod
Utilities.log("Hit get all contacts at 56")
Dim intCustomerID As Integer = Convert.ToInt32(strCustomerID)
Dim lstContactNames As New List(Of NContactNames)
'I add some contacts to the list.
Utilities.log("returning the lst count of " & lstContactNames.Count)
Return lstContactNames
End Function
<ServiceContract()> _
Public Interface IGetEmpl



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: