Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have included a web service in my project.It works fine.Then to Test it i made a client.It also works fine and i have added reference successfully.Now the issue is that client passes a value.How to send that value to my application.


My wcf service code



public class MvcService : IMvcService
   {
       public void DoWork()
       {

       }
       #region IMvcService Members
       public User GetName(string name)
       {
           User tUser = new User();
           tUser.NAME = name;
          // return View(tUser);
           return tUser;
       }
       #endregion
   }




Now My client code is as follows..


public class Default1Controller : Controller
    {
        //
        // GET: /Default1/
        public ActionResult Index()
        {
            MvcService.MvcServiceClient tMvcServiceClient = new MvcServiceClient();
            MvcService.User tUser=new MvcService.User();
            tUser.NAME="alpa";
            tMvcServiceClient.GetName(tUser.NAME);
            return View();--------------->What should be written over here so that it comes to my application
        }
    }
Posted
Comments
ShridharPanigrahi 18-Feb-14 4:55am    
Wont be easier if u access the service in your application instead of a client?
-SP

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900