?
Solved

Creating mock WebService server from WSDL.exe output

Posted on 2013-05-23
1
Medium Priority
?
800 Views
Last Modified: 2013-05-29
Hey,

I need to create a mock Web Service that I can use to test my client application.

I have the WSDL from the web service. I have generated .cs code using the wsdl.exe /serverInterface command.

How do I get this going in a new WebService project in Visual Studio?

So far, I have imported the .cs file ("InterfaceWebService.cs"). But now I am not sure how to implement it in the standard Hello World code.

Thanks for any pointers
0
Comment
Question by:mhdi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
apeter earned 2000 total points
ID: 39194945
Can't you create a wrapper from the interface you generated and use that ?

class WebServiceClientWrapper
{
       IYourserverInterface _proxy;

    public WebServiceClientWrapper(IYourserverInterface obj)
   {
             proxy = obj;
   }
    public string MethodYouUse()
    {
            _proxy.WebServiceMethodYouUse();
      }
}

//Temporary class which implement the web service methods
Class TempWebSErvice : IYourserverInterface
{
   // implemet all the method
}

//below code can be replaced when you get the actual proxy.

WebServiceClientWrapper proxy = new WebServiceClientWrapper(new TempWebSErvice());
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question