Hi All

 

I have multiple independent xsd schemas who have  same elements in them.

We cannot use namespace in our xsd as we are interacting with external systems using the XML files.

 

I am generating independent jar files out of each of these xsd’s.

 

After generating the jar files I see "system” or  “element\_nons" files path are same in both jar files, this is resulting in error

 

nested exception is-- org.apache.xmlbeans.XmlException- XML object is not of type D=ELEMENT_OF_XML

 

or   "org.apache.xmlbeans.XmlException:

XML object is not of type D=Trade"

 

When I try to pass XML of type 2nd Schema.

 

Basically the xsb files with same names in different jar files are causing the problem.

 

Can any one assist me in solving this issue.

 

Eg  

 

I have 2 xsd schamas whose Root start ith string Trade.

Ex:

Schema 1:

 <xs:schema

   xmlns:xs="http://www.w3.org/2001/XMLSchema"  

   elementFormDefault="qualified">

 <xs:element name="Trade">

     <xs:complexType>

       <xs:sequence>

  <xs:element name="tradeLine" type="tradeLine"/>       

       </xs:sequence>

     </xs:complexType>

   </xs:element>

--------------------------

 

Schema 2:

 

<xs:schema

   xmlns:xs="http://www.w3.org/2001/XMLSchema"  

   elementFormDefault="qualified">

 <xs:element name="Trade">

     <xs:complexType>

       <xs:sequence>

  <xs:element name="orderLine" type="orderLine"/>       

       </xs:sequence>

     </xs:complexType>

   </xs:element>

---------------------

 

The error is

  "org.apache.xmlbeans.XmlException:

XML object is not of type D=Trade"

 

When I try to pass XML of type 2nd Schema..

 

Is -repackage "from:to"  any good ? for this situation ??

The other solution would be class loader I guess ?? has it been tried and tested ?

 

 

Thanks in advance

Sushant

 

Reply via email to