[ http://issues.apache.org/jira/browse/TUSCANY-30?page=all ]
Jean-Sebastien Delfino closed TUSCANY-30:
-----------------------------------------
Resolution: Invalid
Adding sdo:name to the XSD attribute did the trick.
Note that this means that we have to take the assembly model XSD from the SCA
spec and modify it to add the sdo annotation.
> Compile error in generated SDO class if you have an XSD attribute named "type"
> ------------------------------------------------------------------------------
>
> Key: TUSCANY-30
> URL: http://issues.apache.org/jira/browse/TUSCANY-30
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Environment: Linux
> Reporter: Jean-Sebastien Delfino
> Assignee: Frank Budinsky
>
> If you generate an SDO class from an XSD element containing an attribute
> named "type", the generated class will contain a getType() method, which
> will conflict with the getType() method from commonj.sdo.DataObject, causing
> a compile error.
> The JavaGenerator should handle this type of conflict and generate methods
> with different names. It already does that if your XSD element contains an
> attribute named "class" for example, in this case it generates a getClass_()
> method to avoid a conflict with java.lang.Object.getClass(). It should use
> the same conflict avoidance algorithm for methods from commonj.sdo.DataObject
> or other interfaces and base classes extended by the generated SDO classes.
> I am running into this problem when I generate the SCA assembly model, with
> attribute Property/type. I worked around this problem for now by renaming the
> attribute to dataType, but this introduces a (temporary) divergence from the
> SCA assembly spec and will impact samples, so I need this bug fixed quickly
> (or a better workaround).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira