ASMX 服务有什么好处

发布于 2024-08-07 20:14:54 字数 336 浏览 2 评论 0原文

我从事网络服务工作已有两年多了。关于 Soap 1.2、WSDL、通信方式以及其他 100 种服务,我有很多话要说。

我见过人们谈论他们深厚的 ASMX 背景和 Web 服务专业知识。但是,当谈到实现时,除了添加 Web 引用和从 C# 调用一些方法之外,我什么也没找到。我们谈论的所有事情(序列化、反序列化、soap 等等)都是由 Microsoft 内部处理的。

所以我想知道这是否是我们在处理 WebServices 时所要做的全部事情,还是还有其他事情要做?

改述:我想知道 ASMX 专家必须了解这些服务的哪些内容。

如果您能提供一些好的参考资料、材料或对此的任何评论,我将不胜感激。

I have been working with webservices for over 2 years now. I have lot to say about services like Soap 1.2, WSDL, the way communication is taking place and 100 of other things.

I have seen people talking about their heavy ASMX background and web services expertize. But, when it comes to implementation I don't find anything but adding a web reference and calling few methods from C#. All the things that we talk about (serialization, deserialization, soap, blah blah) is taken care by Microsoft internally.

So I want to know if it is all we have to do while dealing with WebServices or is there anything more to it?

Rephrase: I wana know what an expert of ASMX must know about these services.

I'll appreciate if you can provide some good references, material or any comments on this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

極樂鬼 2024-08-14 20:14:54

我认为您是从实现者/工具的角度来处理这个问题的;是的,Visual Studio 做了很多繁重的工作,让开发人员感觉调用 Web 服务与调用任何方法是一样的——但是盲目使用这些工具而不知道正在生成什么代码以及它是如何工作的开发人员,正如你所建议的,不是专家。

要说您是专家,我认为您需要能够谈论以下内容:

  • 在架构中使用服务的优点和缺点(性能考虑、版本控制问题、同步与异步等)
  • 您想要的原因使用 ASMX 与 WCF
  • SOAP 协议的内部实现、如何使用 SOAP 标头实现安全性等。
  • “内部结构”,因此您可以公开服务以供非 Microsoft 客户端(java 等)使用。
  • 了解 WSE 的版本,包括不同版本
  • 安全问题 - 如何保护对服务的访问,以及如何保护来回传输的数据

I think you are approaching this from a implementor/tools standpoint; yes, Visual Studio does a lot of the heavy lifting to make a developer feel like calling Web services is the same as calling any method -- but developers who use the tools blindly without knowing what code is being generated and how it all works are, as you suggest, not experts.

To say you are an expert, I think you would need to be able to talk about things like the following:

  • Pros and Cons of using services in your architecture (performance considerations, versioning issues, synchronous versus async, etc.)
  • Reasons you would want to use ASMX versus WCF
  • Internal implementaiton of the SOAP protocol, how SOAP headers can be used for security, etc.
  • Knowledge of the "internals", so you could potentially expose services for consumption by non-Microsoft clients (java, etc.)
  • Features of WSE, including the different versions
  • Security concerns -- how to secure access to a service, and how to secure the data being transferred back and forth
我很坚强 2024-08-14 20:14:54

如果您想认为自己是 ASMX 专家,那么您需要了解 SoapExtension 类和相关的 SoapExtensionAttribute。我认为没有必要了解 SoapExtensionImporterSoapExtensionReflector

您还应该了解 XML 序列化,因为它用于在 ASMX 服务中的对象和 SOAP 之间进行序列化和反序列化。

您还应该了解,Microsoft 现在将 ASMX Web 服务视为“遗留技术”(根据要求提供参考)。

If you want to consider yourself an expert in ASMX, then you need to understand the SoapExtension class and the related SoapExtensionAttribute. I do not feel that it's necessary to understand SoapExtensionImporter and SoapExtensionReflector.

You should also understand XML Serialization, since that is what is used to serialize and deserialize between objects and SOAP in an ASMX service.

You should also understand that Microsoft now considers ASMX web services to be "legacy technology" (reference on request).

爱的故事 2024-08-14 20:14:54

我想说,从 Web 服务的角度来看,仅了解 ASMX 和/WCF 基础知识并不能使您成为专家。

确实,所有管道都已处理完毕,但您通常必须在某一时刻返回到它。连接 asmx 到 asmx、wcf 到 wcf、axis2 到 axis2 总是很容易......但是一旦你开始让这些通信在一起,问题就开始出现。您是否曾经参与过使用 Web 服务的项目,但在某些时候您遇到了生成的 WSDL 或生成的代理的问题?

我想说,对于一个自称是 asmx 专家的人来说,如果你开始谈论肥皂 1.1 和 1.2、WS 基本配置文件、WS-* 以及所有那些乍一看似乎被抽象出来的东西,他不应该表现出惊讶,但你必须在某个时候回来。

I would say that just knowing ASMX and/WCF basics doesn't make an expert out of you from a web service point of view.

It is true that all the plumbing is taken care of, but you generally have to go back to it at one point or another. It's always very easy to connect asmx to asmx, wcf to wcf, axis2 to axis2... But once you start to make these communicate together, problems start to show. Did you ever worked on a project using web services where at some point you had issues with the generated WSDL, or the generated proxy?

I would say that for someone to claim being asmx expert, he shouldn't look surprised if you start talking about soap 1.1 and 1.2, WS basic profile, WS-*, and all those things that apears to be abstracted away at first sight, but which you'll have to come back to at some point.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文