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.
Summary: | Generated code has compilation errors. | ||
---|---|---|---|
Product: | webservices | Reporter: | pcmreddy <pcmreddy> |
Component: | Client | Assignee: | Milan Kuchtiak <mkuchtiak> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | error |
Description
pcmreddy
2007-05-22 05:25:51 UTC
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. |