Yan,
Try returning a String from your GeneralizedFieldHandler and see if it
makes a difference.
--Keith
Yan Pujante wrote:
Hello
I am trying to do the following. I have an xml schema containing the
following
section:
<xs:element name="expirationDate" type="xs:int"/>
I then have a binding file which declares the following:
<cbf:elementBinding name="expirationDate">
<cbf:member java-type="test.castor.MonthYear"
handler="test.castor.MonthYearFieldHandler"/>
</cbf:elementBinding>
MonthYear is a simple class that converts a number 200510 into a year
and a month.
My field handler inherits from GeneralizedFieldHandler.
I run the code generator on it and when I run my program to marshall my
object,
the following xml gets rendered:
<expirationDate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="java:java.lang.Integer">200512</expirationDate>
What I would really want is
<expirationDate>200512</expirationDate>
Why does it get generated like this ? Is there a way to change this
behavior ?
I know that in the example given in the documentation the xml looks like
this:
<root>2004-05-10</root>
Why does it look different for me ? (the only thing different is that I
am using a
binding file and code generation rather than a mapping file.
Thanks for your help
Yan Pujante
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------