-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Converting Database tables to Xml/xsd documents
PostPosted: Fri Apr 13, 2007 2:09 pm 
Newbie

Joined: Fri Apr 13, 2007 11:35 am
Posts: 1
How can I convert Oracle Db to xsd schemas?

I am thinking using hibernate we can convert DB tables into Java objects and after that using tibco(EAI tool....we are already been using) business works can generate xsds from java objects.

1) Is this a feasible way or any other better way to acheive this?

2) Once done with the above approach, how can we use this system for dynamic transactions in production? (for example transactions like sending xml documents and validating against genarated schemas and do some data transformation inside tibco and updating the DB and sending back the acknowlegement)

Any help in this regard is appreciated


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 14, 2007 10:41 pm 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
I have done something similar using JAXB2 and Hibernate 3.2. Basically, you annotate your classes with both EJB3 and JAXB annotations. With your entities annotated a both JAXB & EJB3, you can then use JAXB to generate an XSD from your domain model that you can have other systems validate against. Form there it's very easy to go from XML -> DB and DB -> XML. Additionally, I have used Mule ESB to convert different message types to my domain model schemas. I have used this approach in my RESTful web services project:

http://resteasy.damnhandy.com/

It works remarkably well. One thing to keep in mind with One-to-Many relationships and JAXB is that you need to manage cyclic child-parent references. JAXB has the hooks to do this, and it's covered here:

https://jaxb.dev.java.net/guide/Mapping ... o_XML.html

Hope this helps.

Ryan-

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember to rate!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.