This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. Open the attached wsdl in netbeans. 2. Create a new PurchaseOrder schema for sample schemas in the same folder. 3. Add <xsd:import namespace="something" location="newpo.xsd"/> under the empty inline schema 4. Validate, shows a error namespace shoudl match targetnamespace of schema 5. Change the namespace to match targetNamespace of schema. 6. Validate 7. AssertionError is thrown. java.lang.AssertionError: the text content under schema couldnt be found in the wsdl document at org.netbeans.modules.xml.wsdl.validator.WSDLInlineSchemaValidator.validate(WSDLInlineSchemaValidator.java:97) at org.netbeans.modules.xml.xam.spi.Validation.validate(Validation.java:78) at org.netbeans.modules.xml.validation.ValidationOutputWindowController.validate(ValidationOutputWindowController.java:64) at org.netbeans.modules.xml.validation.ValidateXMLCookieImpl.validateXML(ValidateXMLCookieImpl.java:48) at org.netbeans.modules.xml.tools.actions.ValidateAction$RunAction.run(ValidateAction.java:95) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
Created attachment 33801 [details] The sample wsdl file
Created attachment 33802 [details] ide.log
We already have a unit test case for this bug (similar stack) which run fine on Windows. I just work on Linux and notice that this test SyncUpdateTest.updatePeerOnInlinSchema failed. Start investigate base on this unit test. Kini: what is the platform you observe this?
I saw this on windows xp
Created attachment 33899 [details] part #1/2: fix in xml/xam
Created attachment 33900 [details] part #2/2: fix in xml/wsdl/api
The issue here is that sync with change deep inside embedded schema does not update SchemaImpl peer node, hence the wsdlSchema.getContentFragment still return old content and failed the assertion. The fix is to implement update all peer nodes of components on path to root. The fix has been integrated into release55_dev. Attachments for the fix are: xml-xam-84659.diff and xml-wsdl-api-84659.diff.
Created attachment 33910 [details] part #3/2: fix test in xml/schema/api
*** Issue 84714 has been marked as a duplicate of this issue. ***
Fixes merged into release55: /cvs/xml/xam/src/org/netbeans/modules/xml/xam/dom/Attic/AbstractDocumentModel.java,v <-- AbstractDocumentModel.java new revision: 1.1.2.24; previous revision: 1.1.2.23 /cvs/xml/xam/src/org/netbeans/modules/xml/xam/dom/Attic/ChangeInfo.java,v <-- ChangeInfo.java new revision: 1.1.2.5; previous revision: 1.1.2.4 /cvs/xml/xam/src/org/netbeans/modules/xml/xam/dom/Attic/AbstractDocumentComponent.java,v <-- AbstractDocumentComponent.java new revision: 1.1.2.27; previous revision: 1.1.2.26 /cvs/xml/xam/src/org/netbeans/modules/xml/xam/dom/Attic/SyncUnit.java,v <-- SyncUnit.java new revision: 1.1.2.4; previous revision: 1.1.2.3 /cvs/xml/wsdl/api/src/org/netbeans/modules/xml/wsdl/model/impl/WSDLModelImpl.java,v <-- WSDLModelImpl.java new revision: 1.2.2.23; previous revision: 1.2.2.22 /cvs/xml/wsdl/api/src/org/netbeans/modules/xml/wsdl/model/impl/TypesImpl.java,v <-- TypesImpl.java new revision: 1.2.2.2; previous revision: 1.2.2.1 /cvs/xml/wsdl/api/src/org/netbeans/modules/xml/wsdl/model/impl/SyncReviewVisitor.java,v <-- SyncReviewVisitor.java /cvs/xml/schema/api/test/unit/src/org/netbeans/modules/xml/schema/model/impl/xdm/SyncTest.java,v <-- SyncTest.java new revision: 1.1.2.32; previous revision: 1.1.2.31 /cvs/xml/wsdl/api/test/unit/src/org/netbeans/modules/xml/wsdl/model/impl/SyncUpdateTest.java,v <-- SyncUpdateTest.java new revision: 1.1.2.22; previous revision: 1.1.2.21
Please can someone from QE verify the fix in the latest release55 build.
v.