• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jax-ws client different between axis2 eclipse and wsimport.

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm sure i have the wrong end of the stick.

Using eclipse (ganymede and web tools) I have a simple pojo service. When I generate the client in eclipse, I get files like servicenameCallbackHandler and servicenamestub. That's using axis2, if my settings are correct.

If I use wsimport I get a client with an object factory and serviceporttype/service and response.

The axis2 samples also use clients that have the object factory type client.

Q. Am I using axis2 incorrectly in eclipse?
Q. Is the service.xml wrong and that the problem?
Q. shoudl axis 2 jax-ws output outputfactory clients?

Thanks.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"stu",

Please check your private messages regarding an important administrative matter.
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wsimport is a command line tool for the JAX-WS reference implementation that ships with the JDK 6. The JAX-WS RI uses JAXB for data-binding.

Axis2 merely implements the JAX-WS API to some extent, so the Java artifacts generated can be quite different compared to those generated by the JAX-WS RI. Also Axis2 doesn't use JAXB but instead offers the choice of ADB (default), Apache XmlBeans, or JiBX for data-binding.

Both JAXB and XmlBeans generate "ObjectFactory" classes.

Your Eclipse/WTP environment is probably generating Axis2/ADB code, the Axis2 samples refer to Axis2/XmlBeans examples and wsimport is using the JAX-WS/JAXB RI from the JDK 6.
 
Stuart Swearengen
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for that. It's 100% useful. I'll dig more into those.

If you want to write once and be able to port between tomcat and websphere, would one implementation be better over another?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It depends:
  • Older versions of WebSphere use JAX-RPC web services. More recent versions are JAX-WS based.
  • The JAX-WS RI requires a minimum of JDK 5 Update 2 and Servlet 2.4. Axis2 (without annotation support) can run on JDK 1.4.
  • The JAX-WS RI can run on Tomcat 5.5 and Tomcat 6.x, Axis2 can run on lower versions than that.

  • In the end I'm not even sure that "write once and deploy to tomcat and websphere" is a realistic objective. Theoretically once you have successfully deployed the framework to your servlet container(s) you should be able to deploy the web services as WARs or AARs - however I would test that in the real environments before relying on it. Note however that pre-Servlet 2.5 based web services are not ideal if you need to support comet web applications which use long-standing HTTP requests. For that application area NIO-based servers like Grizzly or Apache MINA are better suited.
     
    reply
      Bookmark Topic Watch Topic
    • New Topic