Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test wsdl locally

I have generated a class using wsdl.exe from the wsdl file.

I inspected the generated code and there is like 3-4 methods available but I guess only by soap protocol(I'm just guessing & probably wrong) which is defined with the attribute above like:

  • [System.Web.Services.Protocols.SoapDocumentMethodAttribute(etc..)]

Simply, I want to create a dummy class from the wsdl and use its methods.

Thanks in advance.

like image 989
Beytan Kurt Avatar asked Oct 12 '22 14:10

Beytan Kurt


1 Answers

I would recommend using svcutil.exe instead of wsdl.exe

Using svcutil makes it really easy to make a "dummy" class (which I am reading as a stub or mock) as it generates an interface as well as a proxy.

So, for example,

svcutil.exe http://www.restfulwebservices.net/wcf/CurrencyService.svc?wsdl

will generate an interface called ICurrencyService and a CurrencyServiceClient.

like image 157
RB. Avatar answered Oct 19 '22 01:10

RB.