Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 36768 invoked from network); 6 Jan 2006 14:25:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Jan 2006 14:25:41 -0000 Received: (qmail 91552 invoked by uid 500); 6 Jan 2006 14:25:10 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 91314 invoked by uid 500); 6 Jan 2006 14:25:09 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 91302 invoked by uid 99); 6 Jan 2006 14:25:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2006 06:25:08 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.72.192.224] (HELO smtp06.web.de) (217.72.192.224) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2006 06:25:07 -0800 Received: from [62.245.199.73] (helo=wagnerlap) by smtp06.web.de with asmtp (WEB.DE 4.105 #340) id 1EusWL-0003Qs-00 for commons-user@jakarta.apache.org; Fri, 06 Jan 2006 15:24:45 +0100 From: "Josef Wagner" To: "'Jakarta Commons Users List'" Subject: Reading Java Plain Objects (OJB) From XML Date: Fri, 6 Jan 2006 15:24:47 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Thread-Index: AcYRLTqKsfdL4w34RiGT2lghtZeYtAAnMNQAAECK6ZA= Message-Id: Sender: JosefWagner@web.de X-Sender: JosefWagner@web.de X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, I want do read different Beans from only ONE XML-Stream like this. On the Homepage, I have only found an example with One Bean per = StringReader :o(... I want to do the following: 1. Writing different Beans in a Stream beanWriter.write("myBean1", new MyBean1()); beanWriter.write("myBean2", new MyBean2()); beanWriter.write("myBean3", new MyBean3()); 2. Reading the different Beans from the written stream beanReader.registerBeanClass("myBean1", MyBean1.class); MyBean1 myBean1 =3D (MyBean1) beanReader.parse(xmlReader); beanReader.registerBeanClass("myBean2", MyBean2.class); MyBean2 myBean2 =3D (MyBean2) beanReader.parse(xmlReader); beanReader.registerBeanClass("myBean3", MyBean3.class); MyBean3 myBean3 =3D (MyBean3) beanReader.parse(xmlReader); This way ends in Exceptions. When I write and read only one Bean, all = works fine. Isn't it possible to have more Beans in the XML output? My second problem is that at this time I haven't the information, which = tipe of Bean (MyBean1, MyBean2, MyBean3) comes as returnvalue, when starting "beanReader.parse(xmlReader);" Thanks a lot for help Josef Wagner (Germany) -----Urspr=FCngliche Nachricht----- Von: dhmspam-betwixt@yahoo.com.ar [mailto:dhmspam-betwixt@yahoo.com.ar]=20 Gesendet: Mittwoch, 4. Januar 2006 13:49 An: Jakarta Commons Users List Betreff: Re: Converting Java Plain Objects (OJB) to XML Hallo (excuse my english, but I am an spanish speaker) You should map each POJO in dot-betwixt file. if you use the addDefaults tag, use the "hide" tag to ignore the properties that you don't want to be mapped. If not, just map the properties that you want to be writed I hope that it helps Bye! --- Josef Wagner escribi=F3: > Hello Users, >=20 > =20 >=20 > I wan't to convert my ojb plain java classes to XML. > I tried to do this with > betwixt. When I do this like in the example on the > Homepage, betwixt > converts also the referenzed objects to xml. I only > want, that betwixt > converts the primitives types (attributes like > integer, string.) of the > current class and not the referenced objects. I > haven't found a flag to > configure this yet. >=20 > =20 >=20 > Any idea? >=20 > =20 >=20 > Thanks a lot >=20 > =20 >=20 > Josef Wagner >=20 >=20 Ing. Diego H. Mornacco Epidata Consulting S.R.L. www.epidataconsulting.com Cel: 15-5884-0040 "K.I.S.S.: Keep It Simple, S...!" =20 =20 =20 ___________________________________________________________=20 1GB gratis, Antivirus y Antispam=20 Correo Yahoo!, el mejor correo web del mundo=20 http://correo.yahoo.com.ar=20 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org