• 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

Hibernate + Axis2 automagically?

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need to develop some SOAP/WSDL web services (presumably using Axis2, although I'm open to alternatives) to provide secured access to an application database (through hibernate).

Here's the lowdown:

I've never used hibernate before, but I've gone through the quickstart, and created an ANT build script that can reverse-engineer my POJOs / Dao from the database information. So far so good.

I've also never used axis2 before, but figured out how to generate java wrappers for an existing SOAP service, from an exposed WSDL URI.

So I guess my question is, is there some facility in axis2, similar to wsdl2java, that I can use to create my web service modules automagically? Ideally I'd like to script the entire code-generation from within ANT, to minimize development time. Has anyone done this before, or can point me to some sample projects?

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

Originally posted by Philippe Desrosiers:
So I guess my question is, is there some facility in axis2, similar to wsdl2java, that I can use to create my web service modules automagically?



Existing POJOs can be exposed via java2wsdl - however that is usually a really bad idea. See Why Contract First? and this topic. Basically you need to spend some serious time deciding on the most effective way that you can expose your data (and functionality) to a client (hint: objects ain't it - look for a coarser grain that involves exchanging messages).

Axis2 supports the use of JiBX which lets you define the binding between your existing POJOs and existing XML Schemas (i.e. your message payloads).

And before you get too entranced with any more auto-magics ... usually you have to directly address the various "impedance mismatches" in a thoughtful manner.

Object Relational Impedance Mismatch
Relational/Object/XML (ROX) impedance mismatch.

Otherwise it becomes a matter "pay now or pay a lot more later". Some auto-magics are fantastic for proof-of-concepts and prototypes but some of them are too "seat-of-the-pants" for production software. I wouldn't be at all surprised if the Hibernate-generated database schema could not hold a candle to a properly designed one which could become a serious issue further down in the life-cycle of the solution.
[ November 18, 2008: Message edited by: Peer Reynders ]
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic