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 96020 - SQL Project WSDL Generation does not name parameters correctly
Summary: SQL Project WSDL Generation does not name parameters correctly
Status: NEW
Alias: None
Product: soa
Classification: Unclassified
Component: SQL Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: Pavan Veeravarapu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-20 12:12 UTC by dante
Modified: 2007-06-27 06:38 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Example Project (8.37 KB, application/octet-stream)
2007-02-20 12:12 UTC, dante
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dante 2007-02-20 12:12:14 UTC
When using the SQL Project and generating Insert, Update & Delete the parameter
names are not generated correctly. Instead of generating parameter names
matching the column names, like the generation of the select statement, it
creates parameters named param1, param2, param3, etc.

This means that I can not easily identify which parameter is which without
knowing the SQL statement.

See attached project 


------------------------------------

KEYWORDS
VERSION: ALASKA 200702090600 (KENAI)
TEAM: FAST
Comment 1 dante 2007-02-20 12:12:59 UTC
Created attachment 38711 [details]
Example Project
Comment 2 Venkat Srinivasan 2007-02-20 12:52:03 UTC
Pavan, please look into this
Comment 3 Alexei Mokeev 2007-02-21 07:54:59 UTC
Filed after Bug Cut-off date and is not STOPPER for Beta.
If you disagree then please rise priority to P1 and remove waiver keyword.
Comment 4 Pavan Veeravarapu 2007-02-21 16:09:09 UTC
When we give SQL statements with parameters, the database drivers does not 
give the parameter names in the parameter metadata that they return.We get the 
parameter type so we give the parameter name as param[i] and associate the 
parameter type with it.

For example, we have a sql statement "insert into employee values (?,?,?,?,?)".
We will get 5 parameters with parameter names 
param1,param2,param3,param4,param5.
The request part in the Message section in the wsdl generated contains these 
parameters with their types.

For select statements also we wont get the parameter names.
for example if we have employee table with 5 columns 
emp_no,ename,name,sal,deptno and we give a statement called "select * from 
employee".
Here we get the resultset metadata and not the parameter metadata.The database 
drivers return the names of the columns when they return the  resultset 
metadata.We use this resultset metadata to generate the response parts where 
as we generate the request parts using the parameter metadata (in messages in 
WSDL).As we dont know the parameter names we generate th parameter names as 
param1,param2,param3,param4,param5.................. 

For example, if we have an employee table with 5 columns 
emp_no,ename,name,sal,deptno) and we give a statement "select * from employee 
where emp_no = ?"

Here we have one parameter and the parameter name will be param1.
and we have one resultset with columns having the column names.
the message in the wsdl reflecting to this sql contains the request part with 
param1, its type and response part with the 5 column names and column types. 


Please let me know if you have any questions.
 
Comment 5 dante 2007-02-21 17:32:39 UTC
Ok I understand that you are using the resultset metadata to generate response
parts but this does not produce a user-friendly WSDL file, especially because I
can't edit those names and guarantee that they will exist after the next Clean &
Build, because the user of the WSDL must know the structure of the SQL statement.

If you consider that the SQL files you are working on contains the names of
columns we should be using these values for the parameter names for Inserts /
Updates / Deletes; i.e. where the ResultSet information can not be used.
Comment 6 Alexei Mokeev 2007-03-06 11:48:37 UTC
Removed EP551_WAIVER_APPROVED