WCF Service RRS feed

  • Question

  • User-2020366656 posted


    I'm relatively new building services and I need some help here. I created a WCF Library and this will return a List<MyObject>, MyObject having a few properties such as names, distance, etc..

    I pressed F5, I got exactly the result I wanted. I published it and called the service in the browser and got the usual confirmation:

    You have created a service.

    To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

    Then I created aclient and here's the compile error message I got:

    Error 1 Cannot implicitly convert type 'TestClientService.ServiceReference1.MyObject[]' to 'System.Collections.Generic.List<TestClientService.ServiceReference1.MyObject>' C:\Users\mathieu\Documents\Visual Studio 2010\Projects\Alternates\TestClientService\Program.cs 18

    I imagine this has to do with serialization and I'm not sure what to do at this point.


    Could you help?



    Monday, October 28, 2013 11:44 AM


  • User-2020366656 posted

    I found the error. Changed List for [] and ir worked.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, October 28, 2013 11:52 AM