有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

不同包中相同类名的javajaxb元素应该相同(使用@XMLTYPE例如:“user”)

我们有两个套餐:

  1. com。亚什。使用者
  2. com。印多尔。使用者

现在,当我们为两者创建JAXB元素时,会显示以下异常:

Two classes have the same XML type name "{http://api.yash.com/v3}user".
Use @XmlType.name and @XmlType.namespace to assign different names to them.

  this problem is related to the following location:
        at com.yash.user
        at protected com.indore.user 

-->  this problem is related to the following location:
        at com.yash.user

但是对于这两个类,我们需要一个相同的名称@XMLTYPE(name=“user”)

那么我们能找到解决办法吗


共 (0) 个答案