jaxb
  1. jaxb
  2. JAXB-1024

we are having multiple schema which is having same element name and same namespace

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.5
    • Fix Version/s: None
    • Component/s: xjc
    • Labels:
      None
    • Environment:

      Windows 7 , jboss EAP 6.1 Final , jdk java version "1.6.0_22"
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04)

      Description

      our application generates the web service classes using JAXB / XJC compiler. we are giving multiple schema as the input to get the java classes for web services . The schema files will be compiled each one and put into the separate packages. assume we are having X and Y schema , just like below mentioned schema. Each schema having same element name , but having the type of complexType .but different complex type. When compilation it will generate the multiple ObjectFactory. This web service , we are trying to deploy in jboss EAP 6.1 ,results the problem of illegalAnnotationException. Can you please anyone advise?

      Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
      The element name {}row has more than one mapping.
      this problem is related to the following location:
      at public javax.xml.bind.JAXBElement com.xxx.tws.pojo.XType.ObjectFactory.createRow(com.xxx.tws.pojo.XType.XType)
      at com.xxx.tws.pojo.XType.ObjectFactory
      this problem is related to the following location:
      at public javax.xml.bind.JAXBElement com.xxx.tws.pojo.XTESTType.ObjectFactory.createRow(com.xxx.tws.pojo.XTESTType.XTESTType)
      at com.xxx.tws.pojo.XTESTType.ObjectFactory

      X:
      **
      <?xml version="1.0"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
      <xsd:element name="row" type="XType"></xsd:element>
      <xsd:complexType name="XType">
      </xsd:complexType
      </xsd:schema

      Y:
      **
      <?xml version="1.0"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
      <xsd:element name="row" type="XTESTType"></xsd:element>
      <xsd:complexType name="XTESTType">
      </xsd:complexType
      </xsd:schema

        Activity

        Hide
        androidgalaxyman added a comment -

        Please close this issue. we have resolved by giving name space for each schema. Thanks

        Show
        androidgalaxyman added a comment - Please close this issue. we have resolved by giving name space for each schema. Thanks
        Hide
        Martin Grebac added a comment -

        Thanks.

        Show
        Martin Grebac added a comment - Thanks.

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            androidgalaxyman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: