JAXB schema to Java Different XmlRootElement name and Class name

后端 未结 1 1852
粉色の甜心
粉色の甜心 2020-12-11 20:28

I have a xsd schema from which I\'m generating some java classes. I\'m using jaxb for the generation.

I want to be able to generate a class annotated with @Xml

1条回答
  •  醉梦人生
    2020-12-11 20:59

    I suggest you to use this bindings

    
        
    
            
                
                    
                    
                
                
            
    
        
    
    

    Class

    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "header"
    })
    @XmlRootElement(name = "customer", namespace = "yourNamespaceIfYouWant")
    public class CustomerRequest
    

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