g-spot
asked on
Creating a webservice in ASP.net that accepts an array
Im trying to create a method for a web service that accepts an array parameter. However I get the following error when trying to run the web service:
You must implement a default accessor on System.Array because it inherits from ICollection.
My code so far is:
Public Class TravelQuote
Inherits System.Web.Services.WebSer vice
Private _superPrice As Decimal = 0
<WebMethod()> _
Public Function GetQuote(ByVal product As String, ByVal destination As String, ByVal grouptype As String, ByVal duration As String, ByVal ages As Array) As String
Return 0
End Function
How do I fix the service to allow the passing of an array?
You must implement a default accessor on System.Array because it inherits from ICollection.
My code so far is:
Public Class TravelQuote
Inherits System.Web.Services.WebSer
Private _superPrice As Decimal = 0
<WebMethod()> _
Public Function GetQuote(ByVal product As String, ByVal destination As String, ByVal grouptype As String, ByVal duration As String, ByVal ages As Array) As String
Return 0
End Function
How do I fix the service to allow the passing of an array?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER