JAXB \ Annox \ Package \ ObjectFactory

140 views Asked by At

I have some problems when using Annox + JAXB with ObjectFactory class.

For example, we have 2 packages with bean classes:

  1. com.my.example.entity.beans.pack1: a) Bean1 b) Bean2 c) Bean3
  2. com.my.example.entity.beans.pact2: a) Bean4 b) Bean5

I have common package for common classes: com.my.example.entity.common ObjectFactory is in this package. It should contain methods for creating objects for *.beans.pack1 and *beans.pack2.

For bean fields mapping i use *.ann.xml files (for example: Bean1.ann.xml)

How i must to correctly create ObjectFactory and JAXB instance for this task?

0

There are 0 answers