Pergunta

Is it possible to have CXF's wsdl2java emit cloneable classes? Maybe via some option or a plug-in?

What I need to do is copy by value a rather complex schema structure from one object tree to another and would rather not get/set each member value by hand or touch the generated classes by hand.

/Björn

Foi útil?

Solução 3

Now I've implemented and contributed an XJC plugin that emits cloneable classes: https://issues.apache.org/jira/browse/CXF-3354

Outras dicas

I would recommend you avoid Cloneable, and rather have the emitted classes be serializable and serialize and deserialize the class(es) to clone them. Here are some instructions on how to do that with CXF, although I never tried it myself.

You COULD write an XJC plugin to do this. CXF does have a couple XJC plugins to do various things that you could use as a model. (and maybe submit back to CXF)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top