开发者

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开发者_JAVA技巧, I want to create a dummy class from the wsdl and use its methods.

Thanks in advance.


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.


The visual studio command prompt has an exe that should allow you to do this.

wcftestclient.exe [service end point address]

hopefuly thats what you mean.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜