On Monday, May 09, 2011 10:04:22 PM Mark juszczec wrote:
> Hi folks
> 
> I'd like to do something like this:
> 
> I've got a CustomDesignedBean (I designed it)
> 
> I've got a web service that returns a standard TransactionResponse object.
> 
> The TransactionResponse obj contains the following field and its
> getters/setters:
> 
> Object data;
> public Object getData(){}
> public void setData(Object o){}
> 
> What I want to do is create the CustomDesignedBean with the service, store
> it in the TransactionResponse obj's data field via the setter, get it back
> out on the client side and cast it back into a CustomDesignedBean
> 
> Problem is, its not working.  I'm getting Marshalling errors in some cases
> and in other cases the object coming back is empty.
> 
> Any suggestions?

Most likely, you would need to add an @XmlSeeAlso annotation onto the 
TransactionResponse that would point at all the possible object classes that 
can go into the "Data" object.   That would allow JAXB to figure out what they 
are and marshal them properly and add theproper xsi:type and things like that.


-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to