how to rename nested classes in jaxb xjc

前端 未结 2 942
面向向阳花
面向向阳花 2020-12-22 01:21

I have a wsdl that imports a schema I am trying to resolve xjc naming multiple nested MyElementName classes with the same name - which doesn\'t compile I have created this b

2条回答
  •  不知归路
    2020-12-22 01:49

    Your XPath:

    //xsd:element[@name='AAA']
    //xsd:sequence/xsd:element[@name='BBB']
    //xsd:element[@name='MyElementName']
    

    Seems to refer to both of your MyElementName elements since they're both under BBB. Try to get rid of //.

    //xsd:element[@name='AAA']
    /xsd:complexType
    /xsd:sequence
    /xsd:element[@name='BBB']
    /xsd:complexType
    /xsd:sequence
    /xsd:element[@name='MyElementName']
    

    I think this is the right direction you go. You have to customize your anonymous inner complex types.

提交回复
热议问题