开发者

ASP.NET: what's the difference between simple and complex type web services?

开发者 https://www.devze.com 2023-01-11 18:26 出处:网络
can someone give me开发者_如何学JAVA a high level overview of what the differences are? why would you choose to use one over the other?Are you just referring to the arguments expected by the web servi

can someone give me开发者_如何学JAVA a high level overview of what the differences are? why would you choose to use one over the other?


Are you just referring to the arguments expected by the web service? That's the only difference I can imagine. Something like:

Simple:

MyWebMethod(string inputString);

Complex:

MyWebMethod(CustomObject inputObject);

The main benefit to the former would be that you can test the web method easily in your web browser. Since it takes only simple native types it will render an input form for you to test it. But in a production environment I see little benefit of one over the other, both will produce a WSDL for clients to consume.

I suppose it's possible that the former of the two may be easier for clients of a different development environment to consume (non .NET code), but I doubt it really makes much of a difference. As long as you're not using really complex arguments, like a System.Windows.Form control or something (which I doubt would work anyway).

0

精彩评论

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

关注公众号