Skip to content

Unable to Parse Schema when CommonTypes are Not Included #49

Description

@ngpayyappilly

I have few XSD files, which has commonTypes included in some of the files and some are not.
<xsd:include schemaLocation="common/CommonTypes.xsd"/>

There is also a binding file where this commontype is defined.

<bindings schemaLocation="../common/CommonTypes.xsd"> <bindings node="//xsd:complexType[@name='SegmentIDRef']"> <class name="SegmentIDRefTypeFromCommonTypes"/> </bindings> </bindings>

I'm not able to parse the files which have no common types included. The xjc parsing gives me the following error

[ant:xjc] [ERROR] 'Address' is already defined [ant:xjc] line 133 of file:/Users/a-8845/Documents/GIT_CODE_BASE/air-farelogix-pad-service/src/main/resources/schemas/farelogix/CCReverseAuthorizationRS.xsd [ant:xjc] [ant:xjc] [ERROR] (related to above error) the first definition appears here [ant:xjc] line 52 of file:/Users/a-8845/Documents/GIT_CODE_BASE/air-farelogix-pad-service/src/main/resources/schemas/farelogix/CCReverseAuthorizationRQ.xsd

How can I prevent this issue? Can someone help? This is working with maven and it is giving the error in Gradle build

Sample App:
spring-gradle-app-share.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions