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.
Build : NetBeans IDE Dev (Build 070518) 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 Windows XP version 5.1 running on x86 en_US (nb); Cp1252 How to reproduce. Create a webapplication. Add Webservice clients using the following WSDLs http://wsparam.strikeiron.com/ZipInfo3?WSDL and http://wsparam.strikeiron.com/emailverify_3_0?WSDL Now goto index.jsp and add webservice cleints. This services requres to supply userid and passwd. Generated code does not allow user to add this information. Looks like generated client code has some problems. When I checked the generated client java files I found code error in the following metod. @WebEndpoint(name = "EmailVerificationSoap") public EmailVerificationSoap getEmailVerificationSoap(WebServiceFeature... features) { return (EmailVerificationSoap)super.getPort(new QName("http://www.strikeiron.com", "EmailVerificationSoap"), EmailVerificationSoap.class, features); } Pl. see attached screen capture for error details. Client for ZIPinfo also has the same error at the same location.
Created attachment 42630 [details] error
In another attempt reproduce this issue: Now no webservice client java files are generated.
> Now no webservice client java files are generated. dup of issue 102203? Probably also a cause of the problems in generated code > Generated code does not allow user to add this information. http://www.strikeiron.com/info/faqs_wsa.aspx#wsa1 seems to be out of date since in the WSDLs there's no LicenseInfo operation. It has been replaced by header in a SOAP message. Following code shows how to add header to the request (Note: this is JAX-WS RI specific): email.EmailVerificationSoap port = service.getEmailVerificationSoap(); email.LicenseInfo li = new email.LicenseInfo(); email.UnregisteredUser uu = new email.UnregisteredUser(); uu.setEmailAddress("requestor's email"); li.setUnregisteredUser(uu); ((WSBindingProvider) port).setOutboundHeaders(new email.ObjectFactory().createLicenseInfo(li)); String email = "some email"; boolean checkAllServers = false; email.ValidateEmailResult result = port.validateEmail(email, checkAllServers); out.println("Result = "+result); To call this service from JAX-WS also copy generated LicenseInfo class to source packages and add @XmlRootElement(namespace="http://ws.strikeiron.com") on top of the class.
To clean this issue a bit: The WSDL on the given URL has been changed recently and the code generated now is better (but see issue 104830). The part with not providing ability to set username and password in generated code is still valid and it is tracked within issue 104550. Thanks for moving this part there! The issue with no generated classes is tracked within issue 102203 (already P1) since I believe it's the same problem. Downgrading this to P3 and leaving this open to track the last part of this report - the error shown in attached screenshot. Milan, I think that the problem is that the "build/generated/client/" source root does not have JAX-WS 2.1.x jars on its internal classpath (this might be valid also for the ws from wsdl case - "build/generated/service" source root).
Right, likely, we should add jax-ws jars regardless running on JDK1.5 or JDK1.6
Should be already fixed. Please file new issue if you find reproducible test case and include NB and JDK version numbers in the report. Thanks.