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 139697 - code generation error
Summary: code generation error
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-11 11:34 UTC by Claude Teissedre
Modified: 2008-09-04 13:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claude Teissedre 2008-07-11 11:34:33 UTC
Context: A Web application with Visual Web JSF and Web Services clients (imported from local WSDL files). A button in
Page1.jsp. WS methods are dragged and dropped into the button_action method of Page1.jsp.

Issue: Wrong variable names generation.

1) In the button_action method, local variables are named "service", "service_1", "service_2", etc., but global
variables are always named "service". This causes a syntax errors (that can be fixed manually)

GLOBAL VARIABLES

public class Page1 extends AbstractPageBean {
    @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/client/LoginService/LoginService.wsdl")
    private LoginService service;
    @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/client/AccountsService/AccountsService.wsdl")
    private AccountsService service;

LOCAL CODE

    public String button1_action() {
        
try { // Call Web Service Operation
   accountsservice.AccountsServiceSoap port = service.getAccountsServiceSoap12();
   ....

try { // Call Web Service Operation
   loginservice.LoginServiceSoap port = service_1.getLoginServiceSoap12();
   ....

2) Occasionally, we have observed other errors in local variable naming or even no error -but that seems to be difficult
to reproduce.

3) Dragging and dropping WS methods in 2 or more buttons produces the same error.
Comment 1 Milan Kuchtiak 2008-07-16 13:03:38 UTC
Fixed.

Diff:
http://hg.netbeans.org/main?cmd=changeset;node=00780c8a99f1
Comment 2 Jaroslav Pospisil 2008-07-24 10:33:53 UTC
Verified in trunk
Comment 3 pgebauer 2008-07-29 12:43:54 UTC
The status has been changed based on the above comment.
Comment 4 pgebauer 2008-07-29 13:23:43 UTC
The fix has been ported into the release61_fixes branch:

http://hg.netbeans.org/release61_fixes/rev/394ff2a6741f