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.

Bug 85859 - PartnerLink is not updated when the actual WSDL is changed
Summary: PartnerLink is not updated when the actual WSDL is changed
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Alexey Yarmolenko
URL:
Keywords:
Depends on: 85684
Blocks:
  Show dependency tree
 
Reported: 2006-09-27 10:22 UTC by Mikhail Kondratyev
Modified: 2006-10-17 16:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
PartnerLinkHelper.diff (995 bytes, application/octet-stream)
2006-10-04 17:19 UTC, Girish Balachandran
Details
Diff file for the fix (6.74 KB, text/plain)
2006-10-05 12:33 UTC, Alexey Yarmolenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kondratyev 2006-09-27 10:22:25 UTC
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
Comment 1 Alexey Yarmolenko 2006-10-02 16:01:25 UTC
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.




Comment 2 Alexey Yarmolenko 2006-10-02 16:06:06 UTC
Chris, please take a look on this...
Comment 3 Girish Balachandran 2006-10-04 02:12:18 UTC
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.
Comment 4 Girish Balachandran 2006-10-04 02:15:04 UTC
Attn : alexeyyarmolenko
Please try the extra steps and let me know your observation.
Comment 5 Girish Balachandran 2006-10-04 17:19:32 UTC
Created attachment 34874 [details]
PartnerLinkHelper.diff
Comment 6 Girish Balachandran 2006-10-04 17:21:10 UTC
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
Comment 7 Alexey Yarmolenko 2006-10-05 12:31:05 UTC
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. 



Comment 8 Alexey Yarmolenko 2006-10-05 12:33:12 UTC
Created attachment 34910 [details]
Diff file for the fix
Comment 9 Denis Anisimov 2006-10-06 14:06:52 UTC
Fix is reviewed.
Some problems are discovered and needs to be fixed before commit.
With those corrections all other looks good.
Comment 10 Alexey Yarmolenko 2006-10-06 14:32:46 UTC
Fix was integrated into relase55 with Denis's suggestions applied
Comment 11 Mikhail Kondratyev 2006-10-17 16:13:06 UTC
Verified in build 2006.10.16