You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Patrick Peck (JIRA)" <xm...@xml.apache.org> on 2005/03/02 14:54:49 UTC

[jira] Commented: (XMLBEANS-34) error compiling classes when using a schema with a redefined subelement

     [ http://issues.apache.org/jira/browse/XMLBEANS-34?page=comments#action_60044 ]
     
Patrick Peck commented on XMLBEANS-34:
--------------------------------------

hello,

i tried to compile said schemas using beta-1, but the bug still appears (jira says it should be fixed in beta-1).

this is the command i used:

scomp -compiler c:\j2sdk1.4.2_04\bin\javac -nopvr Core.20020225.xsd Core.20020831.xsd xmldsig-core-schema.xsd

do i have to use additional options?

regards
patrick

> error compiling classes when using a schema with a redefined subelement
> -----------------------------------------------------------------------
>
>          Key: XMLBEANS-34
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-34
>      Project: XMLBeans
>         Type: Bug
>   Components: Compiler
>     Versions: Version 1
>     Reporter: Patrick Peck
>     Assignee: Radu Preotiuc-Pietro
>      Fix For: Version 2 Beta 1, Version 2 Beta 2, Version 2
>  Attachments: Core.20020225.xsd, Core.20020831.xsd
>
> when trying to compile the two schemas ('Core.20020831.xsd' and 'Core.20020225.xsd') i get a java compile error because of an overridden 'getInfo()' method in 'ReferencesCheckResultType', which declares a different return type in the base type 'CheckResultType'. you have to compile the schema using the -nopvr option.
> the root cause is: while 'ReferencesCheckResultType' is derived from 'CheckResultType', it also declares an 'Info' subelement which has a different type than the 'Info' subelement in 'CheckResultType'. although from a xml schema point of view these two types are compatible.
> i didn't find any way to work around this. i think this is a rather fundamental problem, rooted in the mismatch between the xml schema model and java object model. maybe there's a way of working around this by configuration (e.g. by being able to redefine the names of getters/setters for certain subelements).

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org