473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to return collection from webservcie

I have a custom collection (Dervided from CollectionBase) and it works pretty
well when I consume it from C# console app.But it is not working if I return
the collection from a web service.The IE complains about( You must implement
a default accessor as it inherits from ICollection).
I want to now what are the methods need to be implemented for that
collection.Any help with sample code is highly appreciated.
Thanks

Jun 1 '06 #1
2 1053
Implement IList -- that has the method "Add(object)".

The de-serializer looks for the method.
--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.org
http://webservices.edujini.in
-------------------
"Ghanashyam" <Gh********@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
I have a custom collection (Dervided from CollectionBase) and it works
pretty
well when I consume it from C# console app.But it is not working if I
return
the collection from a web service.The IE complains about( You must
implement
a default accessor as it inherits from ICollection).
I want to now what are the methods need to be implemented for that
collection.Any help with sample code is highly appreciated.
Thanks

Jun 1 '06 #2
Hi, I had same problem, when I tried to return my custom serilized collection
from Web Service.
It was solved then I implemented IList interface, and exactly "this[int]
indexer".
I think this indexer is it - default accessor.
"Ghanashyam" wrote:
I have a custom collection (Dervided from CollectionBase) and it works pretty
well when I consume it from C# console app.But it is not working if I return
the collection from a web service.The IE complains about( You must implement
a default accessor as it inherits from ICollection).
I want to now what are the methods need to be implemented for that
collection.Any help with sample code is highly appreciated.
Thanks

Jun 4 '06 #3

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

Similar topics

3
by: Eric the half a Bee | last post by:
Hello I am trying to implement a search function within a collection of Employees. I am searching for a specific EmpID number in the collection, and if it is found, I want to return the...
6
by: Whoever | last post by:
Here's what I have A custom collection: public class aUser { public string UserName { get {...} set {...} } public class UserList : System.Collection.CollectionBase { public void Add(aUser...
2
by: kermit | last post by:
I have a .net aspx page MyPage.aspx (client side) with code behind MyPage.aspx.vb (server side). I use the Page_Load event in MyPage.aspx.vb to load data into a multiteir class based...
7
by: nafri | last post by:
hello all, I want to create a function that returns the first element of the Array that is input to it. However, the Input Array can be an Array of points, double, or anyother type, which means...
1
by: Thomas D. | last post by:
Hello all, I'm using the IXmlSerializable interface for a project and encounter some problems when testing my webservice in a client application. I know this interface is undocumented and not...
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
1
by: Ghanashyam | last post by:
I have a custom collection (Dervided from CollectionBase) and it works pretty well when I consume it from C# console app.But it is not working if I return the collection from a web service.The IE...
11
by: joey.powell | last post by:
Hello, I have a windows forms application (VS2005) where I need to do the following... 1. Startup with a main form. 2. Have the user to select a file and then bring up a second form modally...
2
by: Veloz | last post by:
Hi there My question is regarding how to best return "collections" from a method call. Should you return an actual object or an interesting/ appropriate interface of the object, to the caller?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.