Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 132301 - Schema model failed to resolve elements from included schema.
Schema model failed to resolve elements from included schema.
Status: VERIFIED FIXED
Product: xml
Classification: Unclassified
Component: Schema Model
6.x
All All
: P1 (vote)
: 6.x
Assigned To: Samaresh Panda
issues@xml
61fixes1-fixed
:
Depends on:
Blocks: 131639
  Show dependency treegraph
 
Reported: 2008-04-08 11:15 UTC by Alexey Yarmolenko
Modified: 2008-06-04 08:45 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Yarmolenko 2008-04-08 11:15:46 UTC
(Please check blocked issue(IZ131639) for example of project, demonstrating the problem described below)
WSDL has inline schema which references elements in included schema.  Included schema DOES NOT contains targetNamespace
declaration. According to spec, targetNamespace for included schema in this case should be the one of including schema. 
Currently, this rule is ignored and when SchemaModel trying to find referenced element, resolver fails the check for
targetNamespace(SchemaModelImpl.java:151)

Proposed fix is to weaken the check for targetNamespace, when model is referenced with <include/>:
        if (targetNamespace != null && targetNamespace.equals(namespace) ||
            targetNamespace == null && namespace == null ||
            targetNamespace == null && refToMe instanceof Include) { //NEW CHECK TO ADD
            found = findByNameAndType(localName, type);
        }

Or we can take targetNamespace from schema, owning the <include/> element.

This issue is blocker for 131639, this priority is P1.
Comment 1 Alexey Yarmolenko 2008-04-08 11:17:44 UTC
Added reference to blocked issue IZ131639
Comment 2 Sergey Lunegov 2008-04-08 11:26:14 UTC
cc-ing Vidhya
Comment 3 Samaresh Panda 2008-04-08 23:43:51 UTC
The proposed fix looks OK to me, however I'm not sure about its repercussions. I wont mind making this change at the
start or middle of a release, but bothers me at this point of a release. If there is a work-around, I suggest we go with
that and from issue 131639 it seems like an easy workaround is to use the target namespace.
Comment 4 Samaresh Panda 2008-04-08 23:52:24 UTC
And as per priority guidelines, it should not be a P1, since there is a workaround.
Comment 5 Sergey Lunegov 2008-04-09 10:25:15 UTC
Sam,

this is request from potential customer. And proposed workaround is not applicable in their situation.
We need to get it fixed in release 61. Raising to P1.
Comment 6 Petr Blaha 2008-04-09 17:13:25 UTC
Sam, please fix the bug in trunk then QE should verify it and we will release the fix as patch1. Thanks, Petr
Comment 7 Samaresh Panda 2008-04-09 18:47:14 UTC
Committed to trunk: http://hg.netbeans.org/main?cmd=changeset;node=706f4c433cfa.
Comment 8 Michael Nazarov 2008-04-25 08:44:05 UTC
Product Version: NetBeans IDE Dev (Build 200804250004)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

Can't see problem.
Will mark as verified, ok?
Comment 9 pgebauer 2008-04-25 11:27:01 UTC
The issue hasn't be verified till 61patch1 nomination cut-off date.
Marked as release61_fixes_candidate2.
Comment 10 Sergey Lunegov 2008-04-25 11:35:48 UTC
Verified by Michael. Included into patch1 candidate list back.
Comment 11 jinb 2008-05-03 16:27:13 UTC
fix backported into release61_fixes branch
http://hg.netbeans.org/release61_fixes/rev/5c5ab237a532


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo