I have seen references to a mapping file being used in the context of code generation several times now, and I guess it's just about time to clarify this for once. The mechanism to alter e.g. the names of the generated classes is named 'binding' and the file used thus is called a 'binding file'.
Mapping (files) are used at run-time during (un)marshalling to map existing Java domain objects to and from XML. Regards Werner Ratnakaran, Manoj wrote: > You use mapping file to alter the names/types of classes/elements > that Castor generates. The mapping file is used mostly at source > generation time, not runtime necessarily. I guess your problem is > trying to figure out which XSD the given XML corresponds to, right? > Unless somebody replies with a Castor solution to this, you may have > to resort to other ways of getting this accomplished. (There are > several options, but we can wait to see if somebody has a more direct > Castor-based solution) > > > > -----Original Message----- From: omikron [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 08, 2006 9:22 AM To: > dev@castor.codehaus.org Subject: [castor-dev] RE: xsd file --> > mapping file > > > May be, it's rather stupid question, and I do not understand castor > architecture, but how can I: > > I've got core part of project, which takes xml from client and run > unmarshaller for it, using given mapping. Then core does some common > functions with resulting object and pass it to module. Module detects > type of given object and does different functions for different > request objects. Using mapping file Castor unmarshall xml automatic, > detecting more appropriate class. Is it possible to do that without > mapping? Or mapping serve another function? > > > Werner Guttmann-4 wrote: >> If you start with an XML schema file, I *assume* that you would >> want to generate domain objects from the schema, no .. ;-) ? >> >> Werner >> >>> -----Original Message----- From: Ralf Joachim >>> [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 08. >>> November 2006 13:50 To: dev@castor.codehaus.org Subject: Re: >>> [castor-dev] xsd file --> mapping file >>> >>> Because you have an already existent class hierarchy. >>> >>> Werner Guttmann schrieb: >>>> Why would you want to create a mapping file, when Castor XML's >>>> code generator creates domain classes and *descriptor classes >>> for you (that >>>> basically hold the same information as a manually provided >>>> mapping would do) ? >>>> >>>> Werner >>>> >>>> >>>>> -----Original Message----- From: omikron >>>>> [mailto:[EMAIL PROTECTED] Sent: Mittwoch, 08. November 2006 >>>>> 13:37 To: dev@castor.codehaus.org Subject: [castor-dev] xsd >>>>> file --> mapping file >>>>> >>>>> >>>>> I've got .xsd file, which represents client-server protocol. >>>>> How to create mapping file from it? -- View this message in >>>>> context: >>>>> http://www.nabble.com/xsd-file---%3E-mapping-file-tf2594984.ht >>>>> ml#a7237702 Sent from the Castor - Dev mailing list archive >>>>> at Nabble.com. >>>>> >>>>> >>>>> ------------------------------------------------------------ >>> --------- >>>>> To unsubscribe from this list please visit: >>>>> >>>>> http://xircles.codehaus.org/manage_email >>>>> >>>>> >>>>> >>>> >>>> >>> --------------------------------------------------------------------- >>> >>>> To unsubscribe from this list please visit: >>>> >>>> http://xircles.codehaus.org/manage_email >>> -- >>> >>> Syscon Ingenieurbüro für Meß- und Datentechnik GmbH Ralf Joachim >>> Raiffeisenstraße 11 D-72127 Kusterdingen Germany >>> >>> Tel. +49 7071 3690 52 Mobil: +49 173 9630135 Fax +49 7071 >>> 3690 98 >>> >>> Email: [EMAIL PROTECTED] Web: >>> www.syscon-informatics.de >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe from this list please visit: >> >> http://xircles.codehaus.org/manage_email >> >> >> > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email