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.
nbbuild: 041007 1. create new WebApp 2. add WebService 3. add WebService Client 4. add Servlet 5. call WebService operation from servlet 6. run webapp 7. java.rmi.RemoteException Test Method option on webservice works fine.
Created attachment 18129 [details] stackTrace
Created attachment 18130 [details] DemoApp with WS, WS client and servlet
When I tried this web application on my PC I got same exception. Then I call web service from other web project and this case is working OK.
Maybe, this issue is related to case when you call web service from same web application.
From the stack trace, you will get this error if the wsdl used in creating the web service client is an incomplete wsdl, that is the wsdl that does not have the actual URL of the deployed web service in the app server. Here's how it works: when wscompile generates the wsdl, it will have "REPLACE_WITH_ACTUAL_URL" as the SOAP address in the service portion of the wsdl. When the web service is deployed in the JSR-109 enabled app server, this value is replaced by the actual URL of the SOAP address in the app server , e.g., http://localhost:8080/MyWebApp/MyWebService. So to get this wsdl, deploy the web service first. The deploy process will put this concrete wsdl in the build directory which you can then use to create the web service client, and you will get past this error. However, when I did this and ran the servlet, I get another error, an IllegalArgumentException, so I'll keep on digging....
Remove all issues from temporary component.
Section's 7.1.2 and 7.1.4 of JSR-109 are very good reading. According to that I have one comment to your description of how it works: "So to get this wsdl, deploy the web service first. The deploy process will put this concrete wsdl in the build directory which you can then use to create the web service client, and you will get past this error." If i understood mentioned sections in JSR-109 well then building of project with web service creates wsdl file with string "REPLACE_WITH_ACTUAL_URL" in the build directory and the deploy process changes this string to some URL. This changed wsdl file (which is the correct one) is placed in directory where this app is deployed (something like AS_HOME/domains/domain1/applications/j2ee-modules/<appname>). So now i know that I've used bad wsdl file when i was creating WebService client - as you said. Is it possible to warn user that he wants to use "invalid" wsdl file (in New Web Service Client dialog)?
Yes it is possible, and this issue is on the table to be resolved in some better way, including and beyond what you are suggesting.
Due to discussion above the summary of this issue has been changed.
I'll fix this for 4.1
Fixed in trunk: http://websvc.netbeans.org/source/browse/websvc/core/src/org/netbeans/modules/websvc/core/client/wizard/ClientInfo.java.diff?r1=1.9&r2=1.10 http://websvc.netbeans.org/source/browse/websvc/core/src/org/netbeans/modules/websvc/core/client/wizard/Bundle.properties.diff?r1=1.5&r2=1.6
v. in 200502012121