Use @XmlType.name and @XmlType.namespace to assign different names to them.
原因是有2个类的namespace没有指定
指定一下就可以了
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "sayHello", propOrder = { "arg0" },namespace = "http://namespace.thats.not.the.same.as.the.generated") public class SayHello { protected String arg0;