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.
WSDL does not validate if large number of changes are made in the Source Editor mode. Open a valid WSDL file. Switch to source editor view. Make a large number of changes making sure the file is valid. When you try to switch to the graphical mode, it complains that the WSDL file is invalid and that it connect display the graphical view, when in fact the WSDL file is valid. Restart Netbeans IDE. Same WSDL file will now validate and the graphical view will display it w/o problem. Best way to reproduce would be to take 2 different and valid WSDL files. Validate both using external editor like XML Spy. Open one WSDL in Netbeans WSDL editor. Switch to source view. Select everything and delete. Copy text from the second WSDL file using simple text editor like notepad. Paste into Netbeans WSDL Editor's Source View. Try switching to Graphical view. It will complain that WSDL is not valid. Restart Netbeans. The WSDL will now validate successfully and the graphical editor will display it.
This a bug in int start = schema.findPosition(); see line 92 in org.netbeans.modules.xml.wsdl.validator.WSDLInlineSchemaValidator in wsdlmodel. The problem is that this start postion is not pointing to start of <schema> tag in inline schema of a wsdl file. so String schemaTop = text.substring(start, index); //get the schema definition. line 98 returns an invalid fragment and does not point to valid <schema> tag. To reproduce copy attached wsdl and xsd file to a bpel project. create another blank wsdl and copy the content of attached wsdl to it and try to validate. you will see following error: C:/Documents and Settings/radval/ActionTests/NSTest/src/test.wsdl:1,39 Content is not allowed in prolog. and this is because line 122 source = new SAXSource(new InputSource(new StringReader(strBuf.toString()))); strBuf is supposed to have valid inline <schema> but it does not due to bug in findPosition()
Created attachment 34288 [details] wsdl
Created attachment 34289 [details] xsd
The content of inlineSchemaBug.wsdl is missing prolog, hence the output validation error is correct. I will verify issue raise by this bug by inserting the prolog: <?xml version="1.0" encoding="UTF-8"?> properly. I will file a separate P3 issue on XDM does not raise not_wellformed errors.
Actually the orginal wsdl with omission of prolog validate fine. Prolog is optional. The issue here is that pasting a prolog-less content over a document with-prolog somehow cause the new in-memory document root also having the prolog tokens. I will keep this issue as XDM issue.
The issue here is during parsing the new content XMLSyntaxParser insert the prolog tokens if is not there (this was for some earlier bug fix). This become issue about fidelity, and mismatch between document tree and document buffer. The easy fix probably to check for mismatch document tokens and flush the model. On the other hand this probably a candidate for waived consider the limited hit.
Reassign to Ayub for history, risk evaluation.
I can reproduce this reordering bug with regular cut and paste text. To aleviate Ayub's bug load, I am going to work on this one.
This could be a bug in diff and merge code.
The issue is caused by document node are skipped during diff, merge and mutate. Fix is somewhat straight forward and does not affect much of xdm sync/mutate code path. Fixes checked in release55_dev: http://www.netbeans.org/source/browse/xml/xdm/src/org/netbeans/modules/xml/xdm/XDMModel.java?r1=1.2.2.45.2.1&r2=1.2.2.45.2.2&sortby=date&only_with_tag=release55_dev http://www.netbeans.org/source/browse/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/MergeDiff.java?r1=1.2.2.13&r2=1.2.2.13.2.1&sortby=date&only_with_tag=release55_dev http://www.netbeans.org/source/browse/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/Change.java?r1=1.1.2.9&r2=1.1.2.9.2.1&only_with_tag=release55_dev http://www.netbeans.org/source/browse/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/DiffFinder.java?r1=1.2.2.20&r2=1.2.2.20.2.1&sortby=date&only_with_tag=release55_dev http://www.netbeans.org/source/browse/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/Difference.java?r1=1.1.2.7&r2=1.1.2.7.2.1&sortby=date&only_with_tag=release55_dev http://www.netbeans.org/source/browse/xml/xdm/src/org/netbeans/modules/xml/xdm/diff/Attic/NodeInfo.java?r1=1.1.2.8&r2=1.1.2.8.2.1&sortby=date&only_with_tag=release55_dev http://www.netbeans.org/source/browse/xml/xdm/test/unit/src/org/netbeans/modules/xml/xam/Attic/AbstractModelTest.java?r1=1.1.2.30&r2=1.1.2.30.2.1&sortby=date&only_with_tag=release55_dev http://www.netbeans.org/source/browse/xml/xam/src/org/netbeans/modules/xml/xam/ModelAccess.java?r1=1.2.2.8&r2=1.2.2.8.6.1&sortby=date&only_with_tag=release55_dev
Fixes also checked in release55 branch.
fix VERIFIED in NetBeans IDE Dev (Build 200704091800)