Eddie and Werner,

Thanks for the explanation.

Kind regards,
.. Thomas.

Werner Guttmann wrote:
Thomas,

assuming that both 'Sender' items are element definitions, the binding
file you are using will not be sufficient to avoid this naming
collision. What you've got so far in your binding file is a statemnt
that instructs Castor (upon code generation) to append a suffix 'Type'
to all classes generated as a result of a <complexType> definition.

As explained by Edward in a follow-up email, you can either ignore the
warning if both 'Sender' elements refer to the e.g. same type. If that's
not required, please consider using another <elementBinding> to instruct
Castor to use a custom class name for (at least) one of the 'Sender'
element definitions.

Have a look at

http://castor.org/srcgen-binding.html#Non-trivial-real-world-example

to see a non-trivial sample for using a binding file and its benefits.

I hope this helps.
Werner

Thomas Varkey wrote:
  
Hi,

I am seeing this warning when I use the source generator, in castor
1.0.4, with a binding file.  Since it is "not recommended" to proceed as
the warning says, can some one help me resolve this issue? Thanks.

Warning: A class name generation conflict has occured between element
'complexType:deliverReqType/Sender' and element
'complexType:readReplyReqType/Sender'. Please use a Binding file to
solve this problem. Continue anyway [not recommended] (y|n|?)n

The command used :

java org.exolab.castor.builder.SourceGeneratorMain
-i mm7.xsd -binding-file C:\Tools\Castor\binding.xml
-package com.xyz.mm7

This question is associated with
http://jira.codehaus.org/browse/CASTOR-1649

Therefore, mm7.xsd is specified there.  The contents of binding.xml file
(received from Werner)

<binding xmlns="http://www.castor.org/SourceGenerator/Binding"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           defaultBinding="element">

    <namingXML>
        <complexTypeName>
            <suffix>Type</suffix>
        </complexTypeName>
    </namingXML>
    
</binding>



---------------------------------------------------------------------
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