473,513 Members | 3,208 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Returning CollectionBase from WebService

Hi All,

I'm trying to build a webservice that returns a CollectionBase.

I am getting this error:

"You must implement a default accessor on
System.Collections.CollectionBase because it inherits from
ICollection."

I've searched and searched on this one - Plenty of articles, none of
which make much sense to me, the common thread seems to be that I need
to add some default properties. (I'm new to .Net - Help!)

I've pasted in my code below.

Many Thanks,

Simon.
<WebMethod()> _
Public Function GetAddresses(ByVal UPRN As String, ByVal USRN As
Integer, ByVal PostCode As String, ByVal PAON As String, ByVal SAON As
String, ByVal DesignatedStreetName As String, ByVal Easting As Integer,
ByVal northing As Integer) As CollectionBase
Dim AddressCollection As New OldInfra.BS7666.AddressCollection
Dim CollAddress As CollectionBase =
AddressCollection.GetAddresses(UPRN, USRN, PostCode, PAON, SAON,
DesignatedStreetName, Easting, northing)
Return CollAddress
End Function

Nov 19 '05 #1
1 1157
I've added the following code to both my webservice and
AddressCollection class. Hasnt made any difference :(

Public Property address() As Address
Get
Return address
End Get
Set(ByVal Value As Address)
address = Value
End Set
End Property

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3511
by: Steve M | last post by:
I have subclassed CollectionBase. I have also implemented GetEnumerator(). I have tried to set the DataSource of a DataGrid to an instance of my subclass. However, the items in the grid are not...
1
410
by: Karuppasamy | last post by:
H I have a WebService calling a Method in a Remote Object. The Remote method Returns an Object. This Webservice also returns the same object. All things are working fine when this Web Service is...
2
2716
by: Scott Reynolds | last post by:
I am having a problem exposing a class inherited from the collection base class as a webservice. If I expose the collection on a web page all works well and I am very happy. However when I try and...
1
3513
by: Morten Dyndgaard | last post by:
Hi, I want to do the following: I have to XmlSerialize a HashTable, but since it inherits from IDictionary it cannot be XmlSerialized, and I prefer not to make my own implementation of...
2
6951
by: Samuel R. Neff | last post by:
What's the advantage of inheriting from CollectionBase as opposed to just implementing IList? It seems that it saves you from having to implement a few properties (Clear, CopyTo, Count,...
5
19560
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
4
1212
by: Daniel | last post by:
I've been asking around and reading but I cannot find a definitive answer. I have customers that need information from our calendar application. The data will come from SQL Server 2000. The...
2
1622
by: Asim Qazi | last post by:
Hi All public class MyResponse { public bool m_bStatus; public string m_szErrorCode; public string m_szMessage; }
1
1446
by: Ronchese | last post by:
Helllo. I need to return a XML from my WebService, but I'm not getting the result as a XML. I mean, instead of receiveing a tag (<xyy></xyz>), I'm receiving it encoded (with &lt; or &gt;). There is...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.