Hi,
I have some classes I need to marshall/unmarshall. These are simple
autogenerated beans with an abstract "frontend" that contains setters and
getters for all properties. Instantiation is handled through static
factory methods. I can't change this implementation. I can, however,
choose whatever format is convenient for the XML instance document.
I pretty much have the following:
abstract class MyBean {
public void setFoo(String foo);
public String getFoo();
}
..Which is then implemented by MyBeanImpl. Instances are created with
MyBean's internal factory class:
MyBean bean = MyBean.Factory.newInstance();
How can I express this in a mapping? Create-method attribute seems to deal
with something else entirely (cf. create-method: Factory method for
instantiation of FieldHandler).
Chapter 5. xsi:types of the documentation takes me part of the way, but
this seems to still require that the implementing class has an empty
constructor. How can I use a (no-arg) factory-method instead? Is there a
simple way to do this that I'm overlooking?
--
Regards,
Audun
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email