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.
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.