I am deciding on the implem开发者_开发技巧entation 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?
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.
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.
精彩评论