Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WebService for JPA Domain model dilemma

 
Vrunda Bapat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is a WebService Design question really.
I have a Domain model - with Spring (3.2) - Hibernate(3.2)-doing it's Spring injected JPA magic to create Entity objects with one to many relationship.
e.g . - Manager has one to many Relationship with Employee
I need to expose some functionality as a WebService.
So I introduced Facade to expose entity beans as WebService.
I am new to Web Services -
For Web Service my choice is AXIS2 - SOAP - Jibx(for complex objects mapping into XML)
  • When SOAP response is simple Object -Web Service rerurns the response
    Problem is with Complex Object returns (Object within Object- generated with relational mapping)
    For Complex Object return - SOAP response is null
    Tried converting List(or collection objects) to Array


  • Still for Complex Objects(generated with relational mapping) return - no response!


    Now my real question is - Is it a good idea to expose JPA entity beans (even via Facade) as a WebService?
    If not , why?
    If yes, what do I need to do to marshall/Unmarshall my complex java objects to produce XML mapping?
    Shouln't use of JibX help with mapping the Java Objects to XML schema , in this case?
    Please throw some light.

    Thanks,
    Vrunda

     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic