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 162053 - Web Service "Test Method" fails for methods taking a String[]
Summary: Web Service "Test Method" fails for methods taking a String[]
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: Manager (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Jan Stola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-06 16:18 UTC by swpalmer
Modified: 2015-04-16 06:35 UTC (History)
0 users

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 swpalmer 2009-04-06 16:18:44 UTC
I have added a web service on the Services panel (This is my own web service, written in Java, consumed via WSDL)

It has many methods, most work fine, but this one:
	@WebMethod
	public int test(String arg1, int arg2, String[] arg3)

fails. (It works from SOAP UI and my java client)

The error I get is :

 NoSuchMethodException 
org.netbeans.modules.websvc.manager.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:763) 
org.netbeans.modules.websvc.manager.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:726) 
java.lang.Thread.run(Thread.java:619) $Proxy77.test(java.lang.String, int, java.util.ArrayList) 
java.lang.Class.getMethod(Class.java:1605) 
org.netbeans.modules.websvc.manager.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:761) 
org.netbeans.modules.websvc.manager.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:726) 
java.lang.Thread.run(Thread.java:619)

There is also no way to control the length of the array/list for the last argument.  The UI put up by NB has a list of 
9 empty strings.
Comment 1 swpalmer 2009-04-06 16:34:05 UTC
Just to clarify - I get this error when I right-click in the Services panel and select "Test Method" on that method.  
Consuming the service and calling it from a simple test app works fine.

I'm not sure if there is a mismatch between the generated method that takes a List<String> and what is shown in the 
exception stack trace with java.util.ArrayList, i.e. is it failing to find a specific implementation that is declared 
to take ArrayList?
Comment 2 Milan Kuchtiak 2009-04-06 16:53:54 UTC
That's a problem of Netbeans tester capability available from Services node. 
Comment 3 Denis Anisimov 2010-10-27 08:08:09 UTC
It still reproducible.
One need to add webservice into Services tab ( Web Services node ).
And call "Test Method" popup menu item.

Appeared dialog contains only 9 possible values for third method argument 
as mentioned in this issue .
And attempt to test method via "Submit" button leads to above exception .
Comment 4 Jan Stola 2015-04-15 13:49:04 UTC
I have fixed the mentioned exception. So, a method with String[] argument can be tested. On the other hand, the restriction on the size of the array passed to the tested web service remains. I have extracted this problem into issue 251856.

Modified file: https://hg.netbeans.org/web-main/rev/758515538baf
Comment 5 Quality Engineering 2015-04-16 06:35:39 UTC
Integrated into 'main-silver', will be available in build *201504160452* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/758515538baf
User: Jan Stola <jstola@netbeans.org>
Log: #162053: Web Service "Test Method" fails for methods taking a String[]