views:

693

answers:

1

Has anyone had any personal experience on why XmlBeans might be preferred over Axis for invoking Web Services?

+1  A: 

I don't think you can use XmlBeans to invoke WebServices. XmlBeans will create a bunch of Java classes representing data types encountered in a XML schema (XSD). Technically you could use those classes to invoke WebServices, but you will have to deal yourself with the SOAP protocol itself.

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.

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. Here is a nice tutorial on how to do JAX-WS with Java 6.

I used to use Axis a lot, now I switched almost exclusively to JAX-WS.

Pablo Santa Cruz