Forums Register Login

WebService for JPA Domain model dilemma

+Pie Number of slices to send: Send
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

    Normally trees don't drive trucks. Does this tiny ad have a license?
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com


    reply
    reply
    This thread has been viewed 1479 times.
    Similar Threads
    How to return Object as a Response (Please Reply)
    Sample Questions for 288 - Need answers
    Client side EJB design pattern
    extract inline XSD from wsdl into an external file?
    Facade design pattern in web services
    More...

    All times above are in ranch (not your local) time.
    The current ranch time is
    Mar 28, 2024 04:19:27.