简体   繁体   English

XmlBeans与Axis for Web Service客户端存根

[英]XmlBeans versus Axis for Web Service client stubs

是否有人在调用Web服务方面为何比XmlBeans更受Axis的青睐?

I don't think you can use XmlBeans to invoke WebServices. 我认为您不能使用XmlBeans调用WebServices。 XmlBeans will create a bunch of Java classes representing data types encountered in a XML schema (XSD). XmlBeans将创建一堆Java类,表示在XML模式(XSD)中遇到的数据类型。 Technically you could use those classes to invoke WebServices, but you will have to deal yourself with the SOAP protocol itself. 从技术上讲,您可以使用这些类来调用WebServices,但是您将不得不处理SOAP协议本身。

AXIS on the other hand, will create a bunch of Java classes from WSDL, and will also create STUB for connecting to the remote service through the SOAP protocol. 另一方面, AXIS将根据WSDL创建一堆Java类,还将创建STUB以通过SOAP协议连接到远程服务。

So, if what you are intending to do is make a WebService call, go for Axis or any other WebService client technology such as the one included by default with new SUN (should I say Oracle?) SDKs so you won't have to deal with external dependencies other than the JVM itself. 因此,如果您打算做一个WebService调用,请使用Axis或任何其他WebService客户端技术,例如新的SUN(我应该说是Oracle?)SDK默认包含的一种技术,因此您不必处理除了JVM本身之外,还具有外部依赖性。 Here is a nice tutorial on how to do JAX-WS with Java 6. 是一个关于如何使用Java 6进行JAX-WS的很好的教程。

I used to use Axis a lot, now I switched almost exclusively to JAX-WS. 我以前经常使用Axis,现在几乎只切换到JAX-WS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM