passing NameValueCollection as parameter to Web Service

A

Al

In my new web services I am attempting to pass a NameValueCollection as a
parameter and return a class object to the calling client. Both the calling
application and the services are written with VB.NET.

Some of the code:
-----------------------------------------------------
<WebMethod(Description:="Create Note")> _
Public Function CreateNote(ByVal StoreIndexValues As
NameValueCollection, ByVal NoteContent As String, ByVal UserID As String,
ByVal Options As NameValueCollection) As CCMSMessage

Dim xCCMS As New CCMS()
Dim xResult As New CCMSMessage()

xResult = xCCMS.CreateNote(StoreIndexValues, NoteContent, UserID,
Options)

Return xResult
End Function
--------------------------------------------------------------


When the client tries to set a reference to the web service, or I just
try to run the start page from the VS IDE, I get the following error:

The error:
---------------------------------------------------------
You must implement the Add(System.String) method on
System.Collections.Specialized.NameValueCollection because it inherits from
ICollection.
--------------------------------------------------------

I don't understand this message and I can't find a similar situation on the
web. Is it not possible to pass a NameValueCollection as a parameter to a
web service?

Thanks in advance for any responses.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top