简体   繁体   中英

what is the Difference between the “/com/sun/xml/ws/” package in jaxws-rt.jar and “/com/sun/xml/internal/ws/” package inside rt.jar

i do not understand the use of an "internal" implementation of jax-ws packages inside rt.jar when they are already available through jaxws-rt.jar. Why would Sun/Oracle take such a decision to integrate jax-ws inside jdk...I dont know if the changes in classes of both the packages in both the jars are carried out parallely....Can some one put light on which should be actually reffered...????

jaxws-rt.jar is not part of the Java RE. But RE needs an implementation of JAXWS internally. So, as far as I remember, they implemented one in the com.sun.xml.internal.ws package to avoid future conflicts and errors if applications put a different implementation of JAXWS on their classpath.

Another aspect: even if someone adds a new implementation to the classpath it's still guaranteed, that the JRE works as expected, even if this new implementation has bugs.

You don't give any context as to where you are seeing this.

By default the JAX-WS implementation that lies behind the javax.xml.ws* types is the one shipped in the JRE. JAX-WS defines a SPI ; in order to override the JRE classes, alternative implementations must reside in endorsed directories .

Some Java EE 5 application servers might work on both Java 1.5 and 1.6; to meet the Java 1.5 specification, the application server would need to ship a JAX-WS implementation. Java EE 6 implementations will override the Java 6 implementation (Java EE 6 mandates JAX-WS 2.2 whereas Java SE 6 mandates 2.0).

Thus, it is possible to see more than one implementation of JAX-WS in some contexts. Which one is used depends on the configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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