I have some legacy Java codes that I'm not allow to make change to but I've to convert
to XML and vice versa. I'm able to marshal the Java code to XML. When I tried to
unmarshal, I get an error message with the mimeId.
This is the error message I recieved:
-->Error : java.lang.IllegalArgumentException: Type conversion error: could not
set value mimeId(java.math.BigDecimal) with value of type java.lang.String
Could you let me know why I'm getting this error message during the unmarshal process?
I have the following Java class and mapping file.
Java class:
public class MimeType {
private BigDecimal mimeId;
private String mimeType;
private String mimeDescription;
public MimeType()
{
mimeId = null;
mimeType = null;
mimeDescription = null;
}
public BigDecimal getMimeId()
{
return mimeId;
}
public void setMimeId(BigDecimal id)
{
this.mimeId = id;
}
public String getMimeType()
{
return mimeType;
}
public void setMimeType(String type)
{
this.mimeType = type;
}
public String getMimeDescription()
{
return mimeDescription;
}
public void setMimeDescription(String mimeDesc)
{
this.mimeDescription = mimeDesc;
}
}
Mapping file:
<mapping>
<!-- Mapping for Mime Types -->
<class name="MimeType"
identity="mimeId">
<description>Mime types</description>
<field name="mimeId" type="big-decimal" >
</field>
<field name="mimeType" type="string">
</field>
<field name="mimeDescription" type="string">
</field>
</class>
</mapping>
thank you in advance,
Ide
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev