Does anyone know how to pass a List<t> to a WCF Service

Posted on 2010-11-11
Last Modified: 2012-06-21
I have a WCF service that accepts a List<participants> as a parameter and I need to call it from the client ie javascript.  Can this be compeleted?

I'm looking to do something like.
var svc = new EMService();
                var valParti = $('#ddlParticipant').val();
                var list = new List<Participant>();
                var part = new Participant();
                svc.SendMessageAll(list, onSuccess, null, null);
Question by:zekuczynski
  • 2

Expert Comment

ID: 34119295
Hi there,

As far as I know you are notable to pass generic objects through wcf.


Author Comment

ID: 34120212
Is there another approach I can take?  Can I pass a collection or list of objects?

Accepted Solution

dxdinh earned 500 total points
ID: 34127657
Can you try to convert your List<P...> collections to Participant [] using ToArray method?

Author Closing Comment

ID: 34155579
That worked.  Thanks.

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
New to SOAP and need some direction 10 79
Greetings C# program 17 105
Hey Audio! 3 28
VB.NET (2008) - Refactoring Question 2 19
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question