locked
How can I call webservice from C# ServerSide RRS feed

  • Question

  • User-1582831422 posted

    How can I call webservice from C# ServerSide and Can I convert the return for that webservice to Generic List ??

    Sunday, August 18, 2013 10:52 AM

Answers

  • User-760709272 posted

    Add a service reference via the project menu, google for more info on calling web services.  As for the return data, you can convert it to anything you want.  How easy that is depends on the data that comes back.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 18, 2013 11:31 AM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, August 18, 2013 9:35 PM
  • User-488622176 posted

    There are in fact 2 ways:

    • Either by calling the services as an external service by adding a service reference (The dev environment will automatically generate the required proxy code)
    • By invoking the service class directly (ex: IMyService svc = new MyService();), after adding the assemblies where the interface & implementation classes are located into.

    Both approaches are fine. The second one is the best/fastest solution when you want to call services from within the same layer of the same application. The webservice (asmx or wcf) layer in this case adds complexity and slows things down. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 19, 2013 2:48 AM

All replies