Two Classes have same XML type name

前端 未结 3 1458
心在旅途
心在旅途 2020-12-18 11:59

Im having this error where it says that i have two classes of same XML type name

so the problem is between InfoSource -> NameSearchFilters -> SearchRequest

<

相关标签:
3条回答
  • 2020-12-18 12:49

    @XmlType(name = "Info_Source", propOrder = { "infoSource"

    Try this in code

    0 讨论(0)
  • 2020-12-18 13:01

    Did you try adding different values of namespace attribute to each of them like @XmlType(namespace="test1", name = "InfoSource", propOrder = { "infoSource" }) ) ?

    0 讨论(0)
  • 2020-12-18 13:01

    Situation like this throws exception 'x counts of IllegalAnnotationExceptions'

    class A{}
    class B extends A{}
    class C extends A{}

    Resolve problem adding annotation into class A like this:

    @XmlTransient
    public class A
    {}

    0 讨论(0)
提交回复
热议问题