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.
Steps to reproduce: - create a BPEL process - create a Web service with two operations - deploy it, then drag Web Service node to the BPEL proces in designer - the new PartnerLink dialog will be opened, accept all defaults - partnerLink will be created, 2 operations will be displayed inside the partnerLink - delete one of the operations in the web service - redeploy web service - drag web service node again to the BPEL process - dialog will be opened, accept defaults - another partnerLink will be created with only one operation displayed. The previously created partnerLink will not be updated and will still display two operations. The partnerLink will be updated only after IDE restart
In release55 DnD handler removes all partner files before calling retriever when some WSDL is DnDed for the 2nd time. This causes the WSDL OM to stop listening for changes in file used to load model from. In release55_dev old partner files ARE NOT removed. I use retriever.setOverwriteFilesWithSameName(true) API instead. It seems that Retriever does not handle this mode correctly. For example, if you try following scenario: -Create 2 SyncSample project -DnD WSDL from project tree of the first one on BPEL diagram in the second. -Go back to the WSDL in the first project and rename PLT -Press "Save All" button on toolbar -Repeat step 2. Note that PL editor dialog still shows the old PLT name and if you open /Partners/SyncronousSample/SyncronousSample1.wsdl in SyncronousSample2 project tree, you will see the WSDL OM is not updated. The same WSDL you will see if open wsdl in stand-alone text editor. No exception is displayed in IDE log or in Retriever Output console.
Chris, please take a look on this...
Retriever seem to retrieve the files correctly and save it. For some stange reason, the retrieved files content gets overwritten at later point of time by something else! Try this out... Instead of just changing the PT name, in the wsdl file, add an import to another new wsdl file. Now, DnD this modified WSDL file to the BPEL again. You will observe that the newly imported file is now retrieved and saved properly. But, then you will see that the WSDL file itself would not have changed. Retriever always retirves the file to the disk and then parses it to find all the imports and then retrieves them resursively. So, for a brief period of time, the modified WSDL file existed on the file system untill it got overwritten by something. Another strange thing is, when I run IDE in the debugger, I see that the files always gets properly overwritten! One more observation: Only the dragged and dropped WSDL files seem to have this problem. The imported WSDL and Schema files always get the changes. In the same sync example, try modifying SynchronousSample.xsd instead of WSDL and try DnD. You will see that the XSD file always gets the changes. As of now, it is not clear what is overwriting the file. Could you please try this out and tell me the result: After the retriever API is done and before the PL property editor is shown to the user, could you call Model.sync() explicitly on the WSDL file and tell me if you see the right changes? The reason why I am saying this is, there is a 99% chance that the WSDL model would not have got the new changes as soon as the retriever wrote in to the existing file. So, calling sync ensures that the model gets the changes properly.
Attn : alexeyyarmolenko Please try the extra steps and let me know your observation.
Created attachment 34874 [details] PartnerLinkHelper.diff
Adding sync indeed solves the problem. I have attached a diff patch for that single line code change with this bug. Please review and commit the fix from your side. Over to alexeyyarmolenko
Thanks, Girish! Calling model.sync() solved the problem. So the complete fix consits of 3 steps: -Get rid of deletion of old files before retrieving new WSDL, use retriever.setOverwriteFilesWithSameName(true) instead -Addded call to model.sync() method to synchronise in-memory model with latest changes in files on disk caused by retriever Attached Diff also contains a final part of the fix for Bug 85684(to use structured retriever for cross-project WSDL DnD). Bug 85684 was fixed incompletely - check my last comment for it.
Created attachment 34910 [details] Diff file for the fix
Fix is reviewed. Some problems are discovered and needs to be fixed before commit. With those corrections all other looks good.
Fix was integrated into relase55 with Denis's suggestions applied
Verified in build 2006.10.16