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.
I have been unable to use the web services client wizard successfully where the URL for the wsdl & service is protected (basic auth-method). (Using the wizard inNetbeans 5.5, this same url will result in a login box). Similarly, a manually captured/local wsdl file will also fail later in the operation of the wizard. In either case, the server returns HTTP response code: 401. I also attempted this URL format without luck: https://<username>:<password>@host/... without luck (verifed in browser first).
It's in wsit module. See the stack trace. JAXWSSupport.createWsdlFolder(true) is called which means the wsdl folder is created if missing. java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1158) at org.netbeans.modules.web.project.jaxws.WebProjectJAXWSSupport.getWsdlFolder(WebProjectJAXWSSupport.java:112) at org.netbeans.modules.websvc.jaxws.api.JAXWSSupport.getWsdlFolder(JAXWSSupport.java:186) at org.netbeans.modules.websvc.wsitconf.wsdlmodelext.WSITModelSupport.getModelForServiceFromJava(WSITModelSupport.java:399) at org.netbeans.modules.websvc.wsitconf.refactoring.WSITRefactoringPlugin$1.run(WSITRefactoringPlugin.java:179) at org.netbeans.modules.websvc.wsitconf.refactoring.WSITRefactoringPlugin$1.run(WSITRefactoringPlugin.java:123) at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:669) at org.netbeans.modules.websvc.wsitconf.refactoring.WSITRefactoringPlugin.prepare(WSITRefactoringPlugin.java:117) at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:406) at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:390) at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:207) at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:784) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)
I don't understand the usecase. The wsit stack trace is from refactoring, but user mentions he can't create ws client at all. I wonder why is refactoring invoked during WS client creation? Am I missing something?
Sorry the comment belongs to issue 136104.
< (Using the wizard in Netbeans 5.5, this same url will result in a login box) That's correct. After you specify user name and password in auth-basic dialog the client artifacts (JAX-WS stub classes) will be created. Then, you need to provide couple of improvements (tricks) in generated code: 1. in the implementation of javax.xml.ws.Service (located in build/generated/wsimport/client directory) - replace the URL string - pointing to secure wsdl file to your local reference: static { URL url = null; try { URL baseUrl; baseUrl = secure.SecureService.class.getResource("."); url = new URL(baseUrl, "/home/user/NetBeansProjects/JavaApplication1/xml-resources/web-service-references/A/wsdl/localhost_8084/WebApplicationT/SecureService.wsdl"); } catch (MalformedURLException e) { ... 2. copy this file to Source Packages folder - you can rather copy entire package with generated sources 3. to access the (secure)service itself - add these 2 lines to your client code, e.g: ... secure.SecureService service = new secure.SecureService(); secure.SecurePort port = service.getSecurePort(); > ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "secure_username"); > ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "secure_password"); Note: When using GlassFish server and web/ejb project - instead of 1,2 - you can use @javax.xml.ws.WebServiceRef injection to access your local wsdl: public class MyServlet extends HttpServlet { @WebServiceRef(wsdlLocation = "WEB-INF/wsdl/SecureService.wsdl") private SecureService service; (Of course, prior to this, you should copy the wsdl file to WEB-INF/wsdl folder) In Netbeans, we can hardly to do anything with this. It is not possible to detect if wsdl or/and service is secured or not.
Hello - this problem with the web service client wizard has been fixed in Netbeans 6.1. At the time of this bug report, access to a wsdl that required authentication at the http-level (http://en.wikipedia.org/wiki/Basic_access_authentication) would fail whereas Netbeans 5.5 would show a username/password login box and complete the wizard. A subsequent update to Netbeans 6.1 has repaired this situation. Thanks for a great product -- I will try to make my bug reports more clear in the future.
more details in issue 135838, also note that some other related minor fixes went to 6.5. It would be great if you could check them and let us know if you find any issue. Thanks.