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

Summary: code generation error
Product: webservices Reporter: Claude Teissedre <cteissedre>
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

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