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 113710 - Can't call ws op from project ws client's service
Summary: Can't call ws op from project ws client's service
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-RPC (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P2 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 12:25 UTC by Jaroslav Pospisil
Modified: 2007-11-12 10:27 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (147.46 KB, image/png)
2007-08-24 12:25 UTC, Jaroslav Pospisil
Details
Diff file of JaxwsInvokeOperationProvider (2.06 KB, text/plain)
2007-10-18 07:27 UTC, Roderico Cruz
Details
Diff file of JaxrpcInvokeOperationProvider (2.06 KB, text/plain)
2007-10-18 07:28 UTC, Roderico Cruz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2007-08-24 12:25:10 UTC
Build 200708230913,JDK1.6

When I Call web service operation in Web app or Java app,I can select ws operations from JAX-RPC clients in other
projects,but not ws operation for JAX-RPC client in actual project.Attaching screenshot.
Comment 1 Jaroslav Pospisil 2007-08-24 12:25:40 UTC
Created attachment 47290 [details]
screenshot
Comment 2 bhate 2007-08-24 18:27:18 UTC
valid bug.
Comment 3 bhate 2007-08-29 19:32:18 UTC
Rico has fixed similar issue last week. I tried to reproduce this with latest source and it works for me now.
Comment 4 Jaroslav Pospisil 2007-10-15 13:44:33 UTC
This is reproducible again in 20071015 and now Call WS Op doesn't work even for operations outside of project (in
previous case at least this worked).This is showstopper for Beta 2. Reopening.

Note: This happens when source level is set to 1.6 .
Comment 5 bhate 2007-10-16 00:20:25 UTC
Ajit and Rico can not repduce on windows with jdk 6. with trunk build and jaxrpc plugin from UC.
marking fixed.
can you verify?
Comment 6 Lukas Jungmann 2007-10-16 17:03:01 UTC
still happens, I have:

-latest beta2 build from http://bits.netbeans.org/download/6.0/beta2/latest/
-latest jaxrpc plugin (from this UC:
http://deadlock.netbeans.org/hudson/job/javadoc-nbms/lastSuccessfulBuild/artifact/nbbuild/nbms/updates.xml.gz)

and I did:
-start IDE with clean userdir and install JAXRPC plugin
-create new java application project
-create new websvc client in it (ie for http://www.mindgram.com/api/sched_call.wsdl)
-go to main method in the main class (file which has been created as part of javapp project)
-invoke call ws operation and select "getSchedule" operation

=> OK button in the dialog is still disabled, but should be enabled
Comment 7 Lukas Jungmann 2007-10-16 17:03:44 UTC
important thing I forgot to say is that IDE must be running on JDK6
Comment 8 bhate 2007-10-16 17:45:27 UTC
reproducible with the instructions from Lukas.
Comment 9 bhate 2007-10-17 00:01:41 UTC
With the steps given by Lukas, its reprodicuble on trunk too.
the culprit is JaxWsInvokeOperationProvider.
The check for java project
projectType == ProjectInfo.JSE_PROJECT_TYPE && isJaxWsLibraryOnClasspath(targetSource)
returns true if source level set to 6.
So jaxwscookie is returned instead of jaxrpc.
Since the wsclient is 1.4 the dialog disables the ok button.
-->rico to address jaxws issue.
Comment 10 Roderico Cruz 2007-10-18 07:27:04 UTC
Created attachment 51188 [details]
Diff file of JaxwsInvokeOperationProvider
Comment 11 Roderico Cruz 2007-10-18 07:28:59 UTC
Created attachment 51189 [details]
Diff file of JaxrpcInvokeOperationProvider
Comment 12 Roderico Cruz 2007-10-18 07:30:27 UTC
Fixed in trunk by determining if J2SE project has a JAXRPC or JAXWS
client.
Comment 13 Jaroslav Pospisil 2007-10-18 10:02:12 UTC
I can still reproduce this with Lukas's steps in (Hudson trunk 4022).
Comment 14 Jaroslav Pospisil 2007-10-18 13:06:58 UTC
I've tested with old version of JAX-RPC plugin,which most probably doesn't contain the fix. I'll wait for new version of
JAX-RPC plugin and test it again.
Comment 15 Jaroslav Pospisil 2007-10-18 15:41:29 UTC
I've tested with old version of JAX-RPC plugin,which most probably doesn't contain the fix. I'll wait for new version of
JAX-RPC plugin and test it again.
Comment 16 Jaroslav Pospisil 2007-10-18 15:42:23 UTC
I've tested with old version of JAX-RPC plugin,which most probably doesn't contain the fix. I'll wait for new version of
JAX-RPC plugin and test it again.
Comment 17 Milan Kuchtiak 2007-10-18 16:28:06 UTC
The test looks fine.

My comment :
the line 73 in JaxRpcInvokeOperationProvider can be deleted I think :
if(projectType == ProjectInfo.JSE_PROJECT_TYPE && !isJAXWSProject(project) && !isJAXRPCProject(project)) return true;

(it's not harmfull, however, the test is already included in JaxWsInvokeOperationProvider)

Nevertheless, when I click the OK button in Call WS Operation action (JAX-RPC client, any project type), the NPE is thrown :
java.lang.NullPointerException
        at
org.netbeans.modules.websvc.jaxrpc.actions.JaxrpcInvokeOperationGenerator.generateJavaClientCode(JaxrpcInvokeOperationGenerator.java:577)
        at
org.netbeans.modules.websvc.jaxrpc.actions.JaxrpcInvokeOperationGenerator.insertMethodCall(JaxrpcInvokeOperationGenerator.java:536)
        at org.netbeans.modules.websvc.jaxrpc.actions.JaxRpcInvokeOperation.invokeOperation(JaxRpcInvokeOperation.java:34)
        at
org.netbeans.modules.websvc.core.webservices.action.InvokeOperationAction.performAction(InvokeOperationAction.java:110)
        at org.openide.util.actions.NodeAction.performAction(NodeAction.java:289)
        at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:118)
Comment 18 Lukas Jungmann 2007-10-18 16:28:17 UTC
well, original issue is fixed, but after pressing OK button, I'm getting:

java.lang.NullPointerException
	at
org.netbeans.modules.websvc.jaxrpc.actions.JaxrpcInvokeOperationGenerator.generateJavaClientCode(JaxrpcInvokeOperationGenerator.java:577)
	at
org.netbeans.modules.websvc.jaxrpc.actions.JaxrpcInvokeOperationGenerator.insertMethodCall(JaxrpcInvokeOperationGenerator.java:536)
	at org.netbeans.modules.websvc.jaxrpc.actions.JaxRpcInvokeOperation.invokeOperation(JaxRpcInvokeOperation.java:34)
	at org.netbeans.modules.websvc.core.webservices.action.InvokeOperationAction.performAction(InvokeOperationAction.java:110)
	at org.openide.util.actions.NodeAction.performAction(NodeAction.java:289)
...

Anyway there's a workaround for the user to switch source level of the project to 1.5, therefore changing to P2.
Comment 19 Jaroslav Pospisil 2007-10-24 16:37:17 UTC
Tested on latest hudson dev build and not reproducible anymore.Probably already fixed.
Comment 20 Milan Kuchtiak 2007-10-24 16:56:54 UTC
Yes, I got the exception.
The NPE is related to the scenario when JAX-RPC client from another project (J2SE) is called into the current J2EE14
project (webapp or ejb). We should probably disable this scenario.
Comment 21 Milan Kuchtiak 2007-10-25 10:16:08 UTC
Fixed.

Diff:
http://websvc.netbeans.org/source/browse/websvc/jaxrpcsupport/src/org/netbeans/modules/websvc/jaxrpc/actions/JaxrpcInvokeOperationGenerator.java?r1=1.3&r2=1.4

There is also a minor issue related to calling WS Operation from another project:
- another project is not added on classpath (issue 112777)
Comment 22 Jaroslav Pospisil 2007-11-12 10:27:26 UTC
VERIFIED