Hi, I have a (quite big) set of schema files that I need to compile to java classes. These schema files share some components which are broken out into separate schema files but unforturnatly they also have elements which are named the same but are slightly different. That causes castor to overwrite the generated source files from some schema files with files generated from another schema which causes ClassCastExceptions later.
To avoid that I wanted to generate the classes from each schema into separate packages so I made a binding file but I can't get the package section to work. Below is the package part of the binding file: <package> <name>com.abrahamsson.ota.messages.ota_airbookrs</name> <schemaLocation>OTA_AirBookRS.xsd</schemaLocation> </package> <package> <name>com.abrahamsson.ota.messages.ota_aircommontypes</name> <schemaLocation>OTA_AirCommonTypes.xsd</schemaLocation> </package> <package> <name>com.abrahamsson.ota.messages.ota_commontypes</name> <schemaLocation>OTA_CommonTypes.xsd</schemaLocation> </package> <package> <name>com.abrahamsson.ota.messages.ota_simpletypes</name> <schemaLocation>OTA_SimpleTypes.xsd</schemaLocation> </package> The Schema file begins like this: <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.opentravel.org/OTA/2003/05" elementFormDefault="qualified" version="2.000" id="OTA2003B"> <xs:include schemaLocation="OTA_CommonTypes.xsd"/> <xs:include schemaLocation="OTA_AirCommonTypes.xsd"/> <xs:include schemaLocation="OTA_SimpleTypes.xsd"/> I.e. it starts with including the common types schemas. What I wanted to accomplish was that javaclasses that corresponds to attributes and elements in OTA_AirBookRS.xsd would be in package com.abrahamsson.ota.messages.ota_airbookrs and so on for the other schema files. Since that didn't work, I downloaded the castor source code and added some debug printout to BuilderConfiguration.lookupPackageByLocation. It turned out that it think that all attributes and elements belongs to the OTA_AirCommonTypes schema, even elements that only exsists in the other schemas. Was I wrong when I thought it would be possible to specify package by schema or is this a bug? In the latter case, could anybody give me a hint of where to search to solve this issue? Best regards Sverker ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
