Solved

Creating mock WebService server from WSDL.exe output

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

707 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