Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 139697 - code generation error
code generation error
Status: VERIFIED FIXED
Product: webservices
Classification: Unclassified
Component: Code
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Milan Kuchtiak
issues@webservices
61fixes3-fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo