You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Messing, Elad" <el...@eml-d.villa-bosch.de> on 2005/10/17 13:39:19 UTC

Best Practice - XML RPC results into the DB

Hello All
	I have a "Best Practice" type of question.
	I am using Cocoon as a WAF for my portal site. The data comes
from a DB, with Hibernate in the middle. JX pages are used to show this
data.

	Now - we will soon inject some data from a 3rd party DB into our
DB (this will happen once a day, over night). The 3rd party is providing
the data as an XML RPC (XML over HTTP - without the "web-services"
overhead) and my question is :
	Will it be a good practice to use Cocoon services to parse this
XML, build Hibernate objects, and save them to the DB ?
	Maybe I should skip Hibernate at all, and just parse the XML and
build SQL statements ?
	Or maybe I should just handle all of it out side of Cocoon ?


	Thank you all !

Elad Messing


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Best Practice - XML RPC results into the DB

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 17 oct. 05, à 13:39, Messing, Elad a écrit :
> ...	Will it be a good practice to use Cocoon services to parse this
> XML, build Hibernate objects, and save them to the DB ?..

If your app's environment is Cocoon it makes sense, there are several 
options to do this:

-Cocoon Forms bindings. This is interesting if you're importing objects 
that you're already using in forms, as you'd have the declarations 
already.

  - An interesting pattern to convert external XML to java objects is 
shown by Ovidiu Predescu at 
http://www.webweavertech.com/ovidiu/weblog/archives/000255.html#000255, 
declaring your java components as XSLT extensions to be able to call 
methods on them.

-Or, use more sophisticated XML-to-java mappings like Castor or 
XMLBeans, depending on the complexity of your input data.

-Bertrand



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org