问题
What is the difference between wscompile and wsimport. Can you please let me know when to wscompile. I normally use wsimport to get all ws artifacts from wsdl. I am confused when to use wscompile?
回答1:
As per my information, JAX-WS has simplified the development of Web Service clients when compared to JAX-RPC. Both technologies have a tool for importing a WSDL to generate client side artifacts. JAX-RPC's tool is wscompile, JAX-WS' tool is wsimport.
The advantage of JAX-WS clients over JAX-RPC clients is portability. JAX-WS generates portable artifacts at much higher percentage, while JAX-RPC generated artifacts are not all portable.
回答2:
The tool wsimport works on a WSDL file which is an XML document describing the web service. The tool wsimport does not care to the style of the service (RPC/DOCUMENT) as described in the WSDL. If the WSDL has RPC-style, it will generate the client stubs for consuming RPC-style web services and similarly for document-style.
来源:https://stackoverflow.com/questions/27167338/what-is-the-difference-between-wscompile-and-wsimport