AXIS vs JAX-WS for Web Service Client

2019-03-25 20:20发布

问题:

I am deciding on the implementation of Web Service Client in Java. I've generated Axis client in Eclipse and JAS-WS client with wsimport. Both solutions work and now I have to choose one to go forward. What should I think about before picking one over the other?

回答1:

The client side of JAX-WS is part of the standard Java API, and the reference implementation is reliable and performant, while Axis requires 3rd party dependencies. If you don't need any functionality implemented by Axis and not offered by JAX-WS, I really don't see any reason why you should opt for Axis and not for JAX-WS.



回答2:

One thing to keep in mind in the comparison. If your web client app has a need to connect multiple users to your back end simultaneously, the Java reference implementation has no way of doing this (at least that I've been able to find). By using the Authenticator class, you're tied to only allowing a single user to ever access the back end and you don't even control the lifespan of that user connection. The Authenticator is a surprisingly difficult-to-use API with severe limitations.