Solved

Creating mock WebService server from WSDL.exe output

Posted on 2013-05-23
1
784 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VS 2017 18 105
transition to visual .net from vb6 5 62
Reactjs with .NET 3 75
Need to sort columns in DataGridView 4 37
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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