I want to call an external webservice. How do I do this in an asp.net mvc program? What options do I have. Does anyone have an example?
Thanks.
I want to call an external webservice. How do I do this in an asp.net mvc program? What options do I have. Does anyone have an example?
Thanks.
check out this article if you're calling your web service client side using jQuery.
It's done with JSON, but you could get XML by changing the dataType parameter to dataType: "xml" or not including it all as it is the default.
If you're doing it server side check out this article. It's VB.Net but you can easily translate it to C#
I hope this helps.
You call an external webservice in an ASP.NET MVC application the same way you call it in any .NET application. If it is a SOAP based service you generate a proxy class using svcutil.exe, if the service uses some proprietary XML you may need to resort to HttpWebRequest.