I am actually not 100% sure, but I thin kthat <enumBindings> might have been 
introduced with 1.1. Let me check this later on.

 

Werner

 

________________________________

Von: Barbara Allori [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 27. April 2007 09:27
An: [email protected]
Betreff: Re: AW: [castor-user] SourceGenerator and binding

 

Thanks very much to you and Ralf.

This is my binding file:

<?xml version="1.0" ?>
<binding xmlns="http://www.castor.org/SourceGenerator/Binding"; 
<http://www.castor.org/SourceGenerator/Binding> 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
<http://www.w3.org/2001/XMLSchema-instance> 
    xsi:schemaLocation="http://www.castor.org/SourceGenerator/Binding
                C:\\Castor\\xsd\\binding.xsd"
    defaultBinding="element">

    <enumBinding
        name="/enumType:formato_data_type">
        <enum-def>
            <enumMember>
                <value>DD/MM/YYYY</value>
                <javaName>DD_MM_YYYY_BARRA</javaName>
            </enumMember>
            <enumMember>
                <value>DD-MM-YYYY</value>
                <javaName>DD_MM_YYYY_MENO</javaName>
            </enumMember>
        </enum-def>
    </enumBinding>

</binding>

(Do you remember? ;-)  It's your suggest to another my question!)

To this point, I think I will use the last Castor release (Castor 1.1.1) with 
<xs:int> or with long type!

Barbara

Werner Guttmann wrote: 

Barbara,
 
Ralf has already provided you with an answer to the <xs:integer> change (that 
unfortunately happens to be backwards-incompatible). As to your mapping 
problem, there have been identical questions already here and in Jira. When 
working towards Castor 1.1, we decided to normalize the way bindings are 
provided by requiring a leading '/' for any binding, incl. complexType 
bindings, etc.
 
Can you give me a short sample of a binding that does not work anymore ? 
 
Werner
 
PS And please, don't start apologizing for your language skills ... ;-). 
Otherwise I'd have to apologize for not being able to rispondere in Italiano, 
as much as I would want to.
 
  

        -----Ursprüngliche Nachricht-----
        Von: Barbara Allori [mailto:[EMAIL PROTECTED]
        Gesendet: Donnerstag, 26. April 2007 15:26
        An: [email protected]
        Betreff: [castor-user] SourceGenerator and binding
         
        Hi,
         
        I am using Castor-codGen-1.1 to do data binding and everything work 
fine.
        But I can't use this version because this version uses a long instead of
        an int.
         
        For example, if I have this attribute:
         
            <xs:attribute name="numeroLivello" type="xs:positiveInteger"
        use="required"/>
         
        with castor 1.0.5 I obtain a field like this:
         
            /**
             * Field _numeroLivello
             */
            private int _numeroLivello;
         
        and with castor 1.1 I obtain a field like this:
         
            /**
             * Field _numeroLivello
             */
            private long _numeroLivello;
         
        Anothe issue is that with castor 1.0.5 I am not able to use a data
        binding as castor tells me:
         
        --Unable to load binding file 'C:\temp\binding.xml' due to the following
        Exception:
        --------------------------------
        Stack Trace for :unable to find FieldDescriptor for 'enumBinding' in
        ClassDescri
        ptor of binding{file: file:///C:/temp/binding.xml 
<file:///C:\temp\binding.xml> ; line: 9; column: 38}
         
         
        So, I can use castor 1.1, but I need to maintain an 'int', or I can use
        castor 1.0.5, but I need to know how use a data binding.
        What can I do?
         
        I apologize for my english!
         
        Thank's
        Barbara
         
        ---------------------------------------------------------------------
        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
 
 
 
 
  

Reply via email to