Sorry for my dumb question, but I really need your help!
I need to create jaxb class which contains classes(from different third-party xsds(both chameleon), so I can't change them) with same fields name. For example: class from fist schema
@XmlRootElement(name = "A")
public class A {
private model.a.StatusType status;
private String operName;
//getters,setters ...
from second schema
@XmlRootElement(name = "B")
public class A {
private model.b.StatusType status;
private String operName;
//getters,setters ...
In real there are more 100 same fields/ And I need to create class :
@XmlType(propOrder = {"a","b"})
@XmlRootElement(name = "Input")
public class Input {
private B b;
private A a;
that's problem, I got Exception:Two classes have the same XML type name Any ideas how to combine class A and class B in my new class Input?
in case I create class Input I get exception 'com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Two classes have the same XML type name "statusType" Use @XmlType.name and @XmlType.namespace to assign different names to them.' But, in real I can't change xsd s which contains class A and class B