Bug 95654 - [editor] invalid WSDL when definition.updateElement() is not called
Summary: [editor] invalid WSDL when definition.updateElement() is not called
Status: NEW
Alias: None
Product: WTP Webservices
Classification: WebTools
Component: wst.wsdl (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P4 normal (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Keith Chong CLA
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2005-05-17 16:37 EDT by Richard Mah CLA
Modified: 2010-07-20 11:36 EDT (History)
2 users (show)

See Also:


Attachments
Stack trace with the location where the NPE happens (2.64 KB, text/plain)
2006-08-21 17:45 EDT, Valentin Baciu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Mah CLA 2005-05-17 16:37:09 EDT
NewWSDLWizard creates invalid WSDL when definition.updateElement() is not 
called before the Binding is created.

Kihup, you mentioned the fix is in RAD.
Comment 1 Kihup Boo CLA 2006-04-04 11:58:59 EDT
Keith,
As discussed.
I am re-assigning this defect to you.
Thanks.
Comment 2 Craig Salter CLA 2006-06-08 00:33:12 EDT
This doesn't sound urgent... but it'd be nice to know why updateElement() needs to be called since as a rule one shouln't need to call that method.  Valentin please investigate when time permits.
Comment 3 Valentin Baciu CLA 2006-08-21 17:43:22 EDT
I commented out the call to updateElement in NewWSDLWizard then stepped through the code. I noticed a NPE in ComponentReferenceUtil#setComponentReference(Part part, boolean isType, String componentName). I'm attaching a stack trace with the exact location. 

This method tries to manipulate a Part's underlying element and of course it NPEs because the model does not have a backing DOM yet. That's why calling updateElement solves the issue - it creates the DOM up-front instead of waiting until the resource is serialized.

I believe I pointed this class to Rich a little while back as one of the cases where we're still manipulating the DOM directly instead of going through the model.  If I remember correctly the assessment was that the risk of changing it was too big for 1.5.1. Rich, please correct me if I'm wrong.

Based on the above, I think this is not a model bug after all - or at least not yet :-). If there are still problems after correcting the editor we'll take it from there.
Comment 4 Valentin Baciu CLA 2006-08-21 17:45:23 EDT
Created attachment 48333 [details]
Stack trace with the location where the NPE happens

Here's the stack trace I mentioned.

Let's get past this and we'll take it from there.
Comment 5 Valentin Baciu CLA 2006-09-25 11:23:22 EDT
Rich, reassigning to you. As per my comment, I belive some things need to be corrected in the editor. If you encounter further model issues after fixing the editor please re-assign to me.
Comment 6 David Carver CLA 2008-06-28 00:19:41 EDT
ping.
Comment 7 Valentin Baciu CLA 2008-11-04 16:12:30 EST
This doesn't seem to be causing any grief. I would be good to refactor the code but this can wait.