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.
Note that, the wizard generates public setUserNamePassword method: ========================= public void setUsernamePassword(String username, String password) { client.register(new org.glassfish.jersey.client.filter.HttpBasicAuthFilter(username, password)); } ========================= which is rather late to call after webTarget is initialized in constructor. The correct code should be: ========================= void setUsernamePassword(String username, String password) { webTarget.register(new org.glassfish.jersey.client.filter.HttpBasicAuthFilter(username, password)); } ========================= May be, generate also another constructor with username, password parameters.
Fixed.
I never tested any of the changes related to security and Jersey 2.0. Thanks. Btw. Milan it is a good practice to append into the issue hg changeset which resolved the issue. Some people even prefix it with repository they pushed the fix into, eg. web-main#123456789
Integrated into 'main-golden', will be available in build *201306262301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/1c9b7bb86457 User: Milan Kuchtiak <mkuchtiak@netbeans.org> Log: #231819 changes in Auth Basic Generator