Metro 与 Java 的 JAX-WS?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12670261/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Metro vs Java's JAX-WS?
提问by Arci
What is/are the difference/s of Java's JAX-WS and Metro? Are they the same of are they two different JAX-WS implementations?
Java 的 JAX-WS 和 Metro 的区别是什么?它们是相同的还是两个不同的 JAX-WS 实现?
According to my research, JAX-WS is already a part of JDK 6. However, JAX-WS does not come with the standard bundle of JDK so I looked for a Java EE jar. However, it seems that Oracle does not host a compiled Java EE jar but instead provides Glassfish which is a Java EE server.
根据我的研究,JAX-WS 已经是 JDK 6 的一部分。但是,JAX-WS 没有附带 JDK 的标准包,所以我寻找了一个 Java EE jar。但是,Oracle 似乎没有托管已编译的 Java EE jar,而是提供了作为 Java EE 服务器的 Glassfish。
I was able to run my web service on Glassfish. What JAX-WS implementation does Glassfish use? Since it's hosted on Oracle, I'm assuming that it is using Java's implementation of JAX-WS which is supposedly a part of JDK 1.6? Am I correct with my assumption? Also, to run a JAX-WS based web service, I need to download JAX-WS jars. I found Metro. But on it's page, I see the link of metro to be a sublink of Glassfish. So I'm now confused. Is Glassfish using Metro? Or is Glassfish using Java's JAX-WS?
我能够在 Glassfish 上运行我的网络服务。Glassfish 使用什么 JAX-WS 实现?由于它托管在 Oracle 上,我假设它使用的是 Java 的 JAX-WS 实现,据说它是 JDK 1.6 的一部分?我的假设正确吗?此外,要运行基于 JAX-WS 的 Web 服务,我需要下载 JAX-WS jar。我找到了地铁。但是在它的页面上,我看到地铁的链接是 Glassfish 的子链接。所以我现在很困惑。Glassfish 使用 Metro 吗?还是 Glassfish 使用 Java 的 JAX-WS?
Are Metro and Java's JAX-WS the same?
Metro 和 Java 的 JAX-WS 是否相同?
回答by m3th0dman
JAX-WS is an API while Metro is the reference implementation for the JAX-WS API; both are from Sun/Oracle, thus are standard. You can see them as an interface (JAX-WS) and a class implementing the interface (Metro), only at a higher level. Glassfish also uses Metro as implementation for JAX-WS.
JAX-WS 是一个 API,而 Metro 是 JAX-WS API 的参考实现;两者都来自 Sun/Oracle,因此是标准的。您可以将它们视为一个接口 (JAX-WS) 和一个实现该接口的类 (Metro),只是在更高的级别。Glassfish 还使用 Metro 作为 JAX-WS 的实现。
To be noted that Metro contains implementation for JAXB and other APIs.
需要注意的是,Metro 包含 JAXB 和其他 API 的实现。
Also, SOAP Web Services are somehow obsolete; the new trend is to use REST Web Services; JAX-RS (with various implementations from the standard Jersey to Restlet or CXF).
此外,SOAP Web 服务在某种程度上已经过时了;新趋势是使用 REST Web 服务;JAX-RS(具有从标准 Jersey 到 Restlet 或 CXF 的各种实现)。
回答by Rahul Khimasia
Accourding to Metro's home page, "Metro consists of JAX-WSReference Implementation project and Web Services Interoperability Technology project."
根据Metro 的主页,“ Metro 由JAX-WS参考实现项目和 Web 服务互操作性技术项目组成。”
Web Services Interoperability Technologies (WSIT) (previously known as Project Tango) includes implementations of:
Web 服务互操作性技术 (WSIT)(以前称为 Project Tango)包括以下实现:
- SOAP over TCP
- WS-AtomicTransactions/Coordination
- WS-MetadataExchange
- WS-Policy (https://github.com/javaee/metro-policy)
- WS-ReliableMessaging
- WS-SecureConversation
- WS-Security
- WS-SecurityPolicy
- WS-Trust
- TCP 上的 SOAP
- WS-AtomicTransactions/Coordination
- WS-元数据交换
- WS-Policy ( https://github.com/javaee/metro-policy)
- WS-ReliableMessaging
- WS-SecureConversation
- WS-安全
- WS-安全策略
- WS-Trust
Look at this answerfor futher information.
查看此答案以获取更多信息。