Calling Client-Side WCF Service With Type List<Of T>

Discussion in 'ASP .Net Web Services' started by pbd22, Oct 20, 2009.

  1. pbd22

    pbd22 Guest


    I am designing a multi-file upload service that also shows upload
    progress for each file.

    If I was to design my WCF method as a SOAP contract, I would do
    something like this:

    var request = IService.UploadMethod(List<Upload> request);

    But, how do I pass the parameter ""request"" of type "List<Upload>"
    when I am calling the method from the client (../upload.svc/

    Help appreciated, thanks.
    pbd22, Oct 20, 2009
    1. Advertisements

  2. pbd22

    Mr. Arnold Guest

    I would assume Upload would just be a string of the filepath to upload.

    On the client-side it would be this.

    var requests = new List<String>();


    var cleint = new WCFservice()

    On server-side it would be this.

    UploadMethod(List<String> requests)

    foreach(var request in requests

    unloadpic.path = request;


    __________ Information from ESET NOD32 Antivirus, version of virus signature database 4524 (20091019) __________

    The message was checked by ESET NOD32 Antivirus.
    Mr. Arnold, Oct 20, 2009
    1. Advertisements

  3. pbd22

    pbd22 Guest

    Can you do that? List<Of T> is a .NET Type, isn't it? How can you use
    it in JavaScript? I just tried this and it didn't work. Also, how can
    you instantiate
    new WCFservice() in JS? I must be missing something here.
    Illumination please?
    pbd22, Oct 20, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.