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 64758 - Cannot add operation to web service
Summary: Cannot add operation to web service
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Adamek
URL:
Keywords: RANDOM
: 65283 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-09-20 15:21 UTC by Martin Grebac
Modified: 2006-01-09 10:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
extbrowser.dll (50.00 KB, application/octet-stream)
2005-11-09 15:53 UTC, Martin Grebac
Details
Screenshot of broken code from David Coldrick (5.74 KB, image/png)
2005-11-22 08:44 UTC, Martin Adamek
Details
diff between real and expected file (356 bytes, text/plain)
2005-11-22 17:27 UTC, Lukas Jungmann
Details
ide log (19.33 KB, text/plain)
2005-11-22 17:28 UTC, Lukas Jungmann
Details
Exception log (3.51 KB, text/plain)
2005-11-24 07:18 UTC, Martin Adamek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Grebac 2005-09-20 15:21:54 UTC
1. Create j2ee app project without webapp
2. Create new web service from scratch in ejb project
3. Right click WS node and select Add operation
4. Add operation getPhone with return type String, parameter name of type String

5. [ERROR] the operation is not visible under WS node, when you look at
generated SEI, the code is wrong, because operation code was added into the
class name: javax.rmi.Rem[here's the code]ote
Comment 1 Milan Kuchtiak 2005-09-21 08:47:31 UTC
I am not able to reproduce the issue.
Neither on Linux nor Windows platform.
Martin, try it again and send the detailed scenario how to reproduce.
Comment 3 Milan Kuchtiak 2005-09-23 08:54:15 UTC
This is specific for Windows platform.
Comment 4 Lukas Jungmann 2005-09-27 15:19:37 UTC
[winXp, beta-build, jdk1.5.0_06-b2]

   Happens to me also when adding operation through editor's context menu. But
if I create new line after "// Enter web service..." comment and invoke "Web
Services | Add Operation" on this new line then all sources are OK.

   The next thing I'm observing is that in some cases (not 100% reproducible)
described steps don't lead to the error described above - ws SEI is generated
correctly now but ws impl class becomes uncompilable after adding operation.
  Full class after adding operation:

public class NewWebServicevvvImpl implements NewWebServicevvvSEI {

    // Enter web service operations here. (Popup menu: Web Service->Add
Operation    /**
     * Web service operation
     */
    public java.lang.String operation() throws java.rmi.RemoteException {
        // TODO implement operation 
        return null;
    }
)
}
  
Comment 5 Milan Kuchtiak 2005-09-27 15:46:37 UTC
It may depend on some changes in java module.
Comment 6 Lukas Jungmann 2005-09-28 22:12:24 UTC
*** Issue 65283 has been marked as a duplicate of this issue. ***
Comment 7 Milan Kuchtiak 2005-10-11 10:01:36 UTC
I am not able to reproduce the issue any more.
Neither on Windows XP nor Linux
It seems that 65939 fix has helped.
Comment 8 Lukas Jungmann 2005-10-18 15:31:35 UTC
Happens to me again in build 200510171800 on Linux => reopening
Comment 9 Martin Grebac 2005-11-09 15:53:49 UTC
Created attachment 26773 [details]
extbrowser.dll
Comment 10 Martin Grebac 2005-11-09 15:55:29 UTC
Forget the attachment, it belongs to another bug.
Comment 11 Martin Adamek 2005-11-18 13:00:02 UTC
Can you please add broken class as attachment?
Comment 12 Martin Adamek 2005-11-22 08:44:18 UTC
Created attachment 27123 [details]
Screenshot of broken code from David Coldrick
Comment 13 Lukas Jungmann 2005-11-22 17:25:06 UTC
Not sure if following can be related to this, but:

   In one of my aut. tests i have j2ee module with ejb and web module. In ejb
module there i have session bean with local interfaces, in web module there I
have web service. Now select ws impl class in editor, go to line 11, select it
and invoke Call EJB from editor's popup menu. Sometimes this leads to the state
when the generated code (method signature) is appended right next to the end of
the comment on line 12 (it says something about how to add ws operation).
   Diff between real and expected files is attached.
   There's also some info exception in log, maybe not related to this, but
attached too.
Comment 14 Lukas Jungmann 2005-11-22 17:27:01 UTC
Created attachment 27163 [details]
diff between real and expected file
Comment 15 Lukas Jungmann 2005-11-22 17:28:12 UTC
Created attachment 27164 [details]
ide log
Comment 16 Martin Adamek 2005-11-22 18:21:25 UTC
I was able to reproduce with some exception in web module.I fixed that. Let's
see if it solved all problems...
/cvs/websvc/core/src/org/netbeans/modules/websvc/core/webservices/action/WebServiceClassesCookieImpl.java,v
 <--  WebServiceClassesCookieImpl.java; new revision: 1.5; previous revision: 1.4
/cvs/websvc/core/src/org/netbeans/modules/websvc/core/webservices/action/AddOperationAction.java,v
 <--  AddOperationAction.java; new revision: 1.19; previous revision: 1.18
Comment 17 Martin Adamek 2005-11-23 16:26:44 UTC
Fixed opening of method in editor.
org.netbeans.modules.websvc.core.webservices.action.WebServiceClassesCookieImpl; 
1.4 -> 1.5
Comment 18 Martin Adamek 2005-11-24 07:16:13 UTC
Feedback from user after last fix:
Just tested for 64758 with a build from nbbuilder (200511231856): didn't get the
misplaced code error, but I got the following exception the second time I tried
to add an operation to a web service: the source code (in the impl this time)
was broken as well.
Comment 19 Martin Adamek 2005-11-24 07:18:26 UTC
Created attachment 27221 [details]
Exception log
Comment 20 Martin Adamek 2005-12-04 13:22:15 UTC
Fixed.
/cvs/websvc/dev/src/org/netbeans/modules/websvc/dev/wizard/WSGenerationUtil.java,v
 <--  WSGenerationUtil.java; new revision: 1.13; previous revision: 1.12
Comment 21 Lukas Jungmann 2006-01-09 10:06:24 UTC
v.