commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sameer Nanda <sam5...@gmail.com>
Subject Re: [betwixt] Problem loading a Bean in Betwixt
Date Tue, 18 Oct 2005 13:29:01 GMT
Hi Konstantin,

Just looked at XStream, looks pretty kool, may be something I might start
looking into for my purpose. Thanks for directing me there. In the mean time
I was stilll wondering why dont I get a <Person> element in the XML o/p even
though I have it declared in my mapping.xml

 <?xml version="1.0"?>
<betwixt-config>
<!--name of the class to map -->
<class name="com.mms.Person">
<!-- standard definations (same as in standard .betwixt file) -->
<element name="Person">
<element name="personId" property="personId"/>
<element name="firstName" property="firstName"/>
<element name="lastName" property="lastName"/>
<element name="type" property="type"/>
</element>
</class>
</betwixt-config>

but when I use mapping file for configuring my BeanWriter, it certainly
doesnt include the <Person> element in the XML document:

<perspectiveResponse>
<object>
<personId>5667</personId>
<firstName>Kelly</firstName>
<lastName>Witham</lastName>
<type>Customer</type>
</object>
</perspectiveResponse>

And this is how I register "mapping.xml" to the BeanWriter.

beanWriter.getXMLIntrospector().register(new
InputSource("src/com/mms/mapping.xml"));

-Regards
Sameer
On 10/18/05, Konstantin Priblouda <kpriblouda@yahoo.com> wrote:
>
>
>
> --- Sameer Nanda <sam504u@gmail.com> wrote:
>
> Hey Sameer,
>
> Just come into my mind. If you are not really
> interested in nice formatted XML ( and only in
> read/write ) you may give xstream
> ( http://xstream.codehaus.org ) a try.
>
> It's good for quick results.
>
> And try to disable proxies ( lazy loading ) in
> hibernate while you are writing stuf out.
>
> regards,
>
> ----[ Konstantin Pribluda http://www.pribluda.de ]----------------
> Still using XDoclet 1.x? XDoclet 2 is released and of production quality.
> check it out: http://xdoclet.codehaus.org
>
>
>
> __________________________________
> Yahoo! Music Unlimited
> Access over 1 million songs. Try it free.
> http://music.yahoo.com/unlimited/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message