Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

javax.xml.ws Packaging simple Questions

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In Java 1.5, Java EE5, the javax.xml.ws pacakages were only in Java EE5.
See:

http://download.oracle.com/javase/1.5.0/docs/api/
and
http://download.oracle.com/javaee/5/api/

Then in Java 1.6, Java EE6, the javax.xmlws packages were in both JavaSE6 and JavaEE6

http://download.oracle.com/javase/6/docs/api/
and
http://download.oracle.com/javaee/6/api/

My questions are:
1. Why are they now in both?
2. If there multiple versions of the javax.xml.ws on the classpath which one gets picked up?
3. Suppose your architecture had to supported on three App Servers. WebLogic, WebSphere and Glassfish (different customers use different vendors).
This presumably mean you will get different implementations of JAX-WS? And the only way to stop this would to use something like Axis2. Correct?

Many thanks.







 
Ranch Hand
Posts: 577
Tomcat Server Notepad Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Luke,
Very good questions indeed!

1. Why are they now in both?


This is to provide light weight support of web services in JSE 6 for someone who just wants to develop standalone(without using server) web services rather depending on heavy weight JEE6 API.

2. If there multiple versions of the javax.xml.ws on the classpath which one gets picked up?


This depends on Classloading mechanism of your server. If there are different versions of classes available and conflicting you get class loading problems otherwise, no problems. If you have access to class-loading isolation configuration like in JBoss, you can carefully choose how exactly you want to load classes. Custom classloading is required to cater different deployed applications classpath requirements on a single server.

This presumably mean you will get different implementations of JAX-WS? And the only way to stop this would to use something like Axis2. Correct?


Not always, you can still use JAX-WS RI(from java6 or JEE) in all these three implementations unless you use any proprietary packages for your web services. Here is an article on comparing different web services frameworks, http://www.predic8.com/axis2-cxf-jax-ws-comparison.htm
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Naren Chivukula wrote:Hi Luke,
Very good questions indeed!

1. Why are they now in both?


This is to provide light weight support of web services in JSE 6 for someone who just wants to develop standalone(without using server) web services rather depending on heavy weight JEE6 API.

2. If there multiple versions of the javax.xml.ws on the classpath which one gets picked up?


This depends on Classloading mechanism of your server. If there are different versions of classes available and conflicting you get class loading problems otherwise, no problems. If you have access to class-loading isolation configuration like in JBoss, you can carefully choose how exactly you want to load classes. Custom classloading is required to cater different deployed applications classpath requirements on a single server.

This presumably mean you will get different implementations of JAX-WS? And the only way to stop this would to use something like Axis2. Correct?


Not always, you can still use JAX-WS RI(from java6 or JEE) in all these three implementations unless you use any proprietary packages for your web services. Here is an article on comparing different web services frameworks, http://www.predic8.com/axis2-cxf-jax-ws-comparison.htm



Thanks I read that article yesterday. Things get more confusing with Axis2 because they provide different ways of doing WebServices from the same WSDL.

Very good article here.

What confuses me about Axis2, is if you wish to use the JAX-WS with Axis2, do you have to change any of your code?
For example, if we look at StAX. You can use the RI by default, but you can also use something like WoodStox by adding it to your classpath.
You use the same JAX-WS contract, you don't need to change code. Then you can check which implementation you are using by doing something like:



With JAX-WS is it something similar? You can use the RI by default, but you can also use something like Axis2, not by changing any of your code but by simply changing your classpath. Then you can use some of the extra features of Axis2 through configuration?

Many thanks.





 
reply
    Bookmark Topic Watch Topic
  • New Topic