How to pass an arraylist filled with a list of objects to a web service and retrive the arraylist back from the client side

Dear Experts,

I created two applications web application (ASP.NET 2.0) and web service. I want to fill an arraylist with a list of objects (Customer Class) then a want to pass it to the web service. In the web service I want to process the list of objects and returned them to the web application as an arraylist of objects also.

I tried to do it many time but unfortunately every time I end up with failure.

Please how can I accomplish such behavior?

Thank you  
SamiDeveloper Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gyanendra SinghArchitectCommented:
You cannot actually pass an actual ArrayList or other .NET object to a web service.
Web Services communicate via XML that is described by XML Schema which is referred to by a WSDL file.  None of these things is capable of describing an ArrayList or any other .NET type.
Web Services are meant to be platform-neutral. How would another platform be able to interpret an ArrayList if it were actually sent?

Refer this link if you want to pass collection

but dont forget to add serilized attribute in your class
SamiDeveloper Author Commented:
Thank you for your response.

Is there is any sample by VB.Net and please I want know how to pass a custom collection as parameter to the web service and also how to receive it back in the consumer client if passable.

Because my scenario is as follow

I need to pass a list of custom objects to the web service which I can include in the custom collection as the solution explained in the link provided (C# sample) then I want to process them there and return them back to consumer client as a custom collection.

Thank again.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.