Hi Tom,
Thomas Fuller wrote:
> Hi,
>
> I seem to have run into a problem with unmarshalling a domain class using
> XStream and I'm not sure what I'm missing here. Let me show you what the
> class looks like as this may help:
>
> (I'll do my best to keep this brief)
>
> @XStreamAlias(WB_SOURCE)
> public class Source extends IdValuePair {
>
> @XStreamAlias(WB_NAME)
> @XStreamConverter (ValueAsStringConverter.class)
> private String name = null;
>
> ...
> }
>
> public class IdValuePair extends IdentityObject {
>
> @XStreamConverter(ValueAsStringConverter.class)
> private String value = null;
>
> ...
> }
>
> public class IdentityObject extends DefaultObject
> implements IdentitySpecification<String> {
>
> @XStreamAlias(ID)
> @XStreamAsAttribute
> private String id = null;
>
> ...
> }
>
> The problem I'm facing is that the name is unmarshalled properly, however
> the value and id are not. If I add a custom source converter, I can
> achieve this however I have the feeling that this should not be necessary
> as XStream should proces the annotations present on parent classes (and
> there appears to be a bug that was fixed several years ago that addressed
> the problem I'm talking about now).
>
> Any thoughts on this would be helpful.
actually I have not enough information to say something useful. What version
of XStream you're using? How do you initialize the XStream? How does the
processes XML look like?
Best would be to write a little unit test with a minimal set of classes
(just like above) that demonstrates the problem.
Cheers,
Jörg
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email