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 122687

Summary: IllegalStateException when adding operation to ws from wsdl
Product: webservices Reporter: Lukas Jungmann <jungi>
Component: DesignerAssignee: Milan Kuchtiak <mkuchtiak>
Status: RESOLVED FIXED    
Severity: blocker CC: nnguyen
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=12787
Issue Type: DEFECT Exception Reporter: 12787
Attachments: stacktrace
used schema

Description Lukas Jungmann 2007-11-24 21:46:07 UTC
Build: NetBeans IDE 6.0 RC2 (Build 200711201000)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05
OS: Linux, 2.6.22-14-generic, i386

User Comments: 
-create new websvc from wsdl attached to issue 122686
-download attached schema
-invoke add operation action in websvc
-add downloaded schema to wsdl
-use schema element "removeNumbers" as parameter
-use schema element "removeNumbersResponse" as return value
-press add button

=> IllegalStateException: mutations cannot occur on nodes already added to a tree
Comment 1 Lukas Jungmann 2007-11-24 21:46:12 UTC
Created attachment 53444 [details]
stacktrace
Comment 2 Lukas Jungmann 2007-11-24 21:48:45 UTC
Created attachment 53445 [details]
used schema
Comment 3 Lukas Jungmann 2007-11-24 22:06:45 UTC
this seems to be very similar to issue 113832, see also issue 113708
Comment 4 Nam Nguyen 2007-11-26 06:27:34 UTC
The stack indicates that the current schema element is added again to the schema.
The test case indicates that the existing schema element should be used as reference only and no new schema element
should be created or added.  I think that the fix should be in add operation by the WS designer. 

Given the use case and no work-around and reported from users, this seems to be more serious that P3.
Not sure Milan or Rico, assign to Milan for now.
Comment 5 Milan Kuchtiak 2007-11-27 13:02:42 UTC
We should handle somehow the Add Operation action for cases where schema file is invalid.
Comment 6 Lukas Jungmann 2008-04-14 17:15:42 UTC
moving opened issues where TM != dev to TM=TBD
Comment 7 Milan Kuchtiak 2008-09-12 14:57:55 UTC
issues@identity
Comment 8 Milan Kuchtiak 2008-11-28 10:37:29 UTC
See the issue 150551.
Comment 9 Milan Kuchtiak 2008-12-09 12:05:54 UTC
Add WS Operation action disabled (for WS from WSDL):
http://hg.netbeans.org/main?cmd=changeset;node=f87a649fbee2
Comment 10 Quality Engineering 2008-12-10 05:57:50 UTC
Integrated into 'main-golden', will be available in build *200812100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f87a649fbee2
User: mkuchtiak@netbeans.org
Log: Fixing multiple P4 issues(e.g. #122687, #122694, #150551) related to Add WS Operation dialog on WS created from WSDL. Action puts new schema elements to wsdl file instead of to XML schema, which is not what user really wants. Modifying wsdl using WSDL editor is better option