The class looks like,
public class QuoteReq {
.....
Vector equipmentTypes;
.....
public Iterator getEqTypes() {
return equipmentTypes.ListIterator();
}
}
mapping.xml entries,
<?xml version="1.0" encoding="UTF-8" ?>
<mapping>
<description>Mapping file</description>
<class cst:name="com.quote.QuoteReq">
<description>Default mapping for class com.quote.QuoteReq</description>
<map-to cst:xml="quote-req" />
.....
.....
<field cst:name="EqTypes" cst:type="java.lang.String"
cst:collection="vector">
<bind-xml name="equipment-types" />
</field>
.....
.....
</class>
</mapping>
Thanks,
Humming
----- Original Message ----
From: Werner Guttmann <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, 31 October, 2006 2:08:49 PM
Subject: Re: [castor-user] Marshalling problem when get method returns
ListIterator over Collection attribute
Can you please show us the sources for the (relevant parts of the) class
in question and the mapping file ?
Werner
sourav chatterjee wrote:
> Hi,
>
> I am facing problem with Castor while marshalling a Java object. The
> object I am going to marshal has a private attribute of type Vector
> and the getter method for this attribute returns a ListIterator over
> the Vector. So Castor is not able to clearly define the type of the
> attribute. In fact, it defines the type as
> ‘java.util.AbstractList$ListItr’ which is an invalid Java type.
>
> Has anybody faced this issue? Please give me some inputs to solve
> this. I expect it may be some mapping file attribute. But I don’t
> want to change the existing class, which might be the last option.
>
> Thanks, Humming
>
>
> __________________________________________________________ Yahoo!
> India Answers: Share what you know. Learn something new
> http://in.answers.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email