How to pass a web service to a MVC controller?
<p>I wondered if you can help with my query. I am trying to use an WSDL web service and call it into a MVC controller and returning it as a view but it does not work any ideas?</p>

<p>I have added it as a service in my project however when I attempt to use it within a controller and return a view I get error.</p>

<p>Here are the steps, codes and issues:</p>

<ol>
<li>FYI, I am using the following public WSDL (<a href="http://w3schools.com/xml/tempconvert.asmx" rel="nofollow noreferrer">http://w3schools.com/xml/tempconvert.asmx</a>) to test my code</li>
<li>A proxy class was generated using the WSDL above</li>
<li>I created an instance of the proxy class and called a method for testing</li>
<li>Passed that object as parameter to View</li>
<li>Generated a view for the method<br>
a.    Tried to pass the proxy class as model reference but it does not work as it throws an error message<br>
b.    It passes the value but still throw an error </li>
</ol>



<pre><code>using Temp.Models;
namespace Temp.Controllers {
    public class HomeController : Controller {
        public TempConvertSoapClient client = new TempConvertSoapClient("TempConvertSoap");
       public ActionResult Index() {
           string result = client.CelsiusToFahrenheit("14");
           return View(result);
       }
       public ActionResult Other() {
           ProxyTest test = new ProxyTest();
           var result = test.service.CelsiusToFahrenheit("23");
           return View(result);
       }
     }
 } 
</code></pre>

<blockquote>
  <p>Code from the View is below the view '57.2' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/Home/57.2.aspx ~/Views/Home/57.2.ascx ~/Views/Shared/57.2.aspx ~/Views/Shared/57.2.ascx </p>
</blockquote>

<p>Are you able to advise what might be the issue?</p>

<p>P. S. I am using Visual Studio and C#</p>