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.
After creating the simple WSIT tutorial-like calculator app, and a client, attempting to reference an operation provided by the service from a client servlet results in an NPE. Steps to repro 1. Create Web->Application 2. Add Web Service 3. In java source, right click Web Service -> Add operation and create an operation named "add" that adds two ints 4. Create client Web -> Application 5. Add Web Service client that refernces the service WSDL 6. Add servlet 7. In servlet, right click and select Web Service Client Resources -> Call Web Service Operation and select the "add" operation in the GUI tree displayed At this point a Warning pops up: org.netbeans.modules.java.source.query.QueryException It seems that due to this error, the servlet code does not get the entries @WebServiceRef(wsdlLocation = "http://localhost:8080/CalcApp/CalcAppWSService?wsdl") private org.me.calc.client.CalcAppWSService service; As a result, the following generated code has a compilation error: symbol service not found try { // Call Web Service Operation org.me.calc.client.CalcAppWS port = service.getCalcAppWSPort(); // TODO initialize WS operation arguments here int i = 2; int j = 2; This is a regression from NB 5.5.1
I can't reproduce the exception and missing @WebServiceRef section is reproducible only when I invoke Call Web Service Operation in code before this line inside processRequest method: "PrintWriter out = response.getWriter();" If I invoke Call.. under this line,everything is correct. Also,when annotation isn't generated automatically,it could be added manually,so I suppose this could be even P3 and not P2.
This issue is reproducyble independently of the line I invoke Call WS Operation. I check it on several PCs and it's 100% reproducible. I agree that @WebServiceRef could be added manually but I think this isuue is P2 as minimum (even maybe P1).
Can you please check whether this is a dup of issue 102202 or issue 101395? If not then attach your stacktrace here, please.
I checked and Yes this appears to be a duplicate of 102202 I get the same stack dump WARNING [global]: java.lang.NullPointerException java.lang.NullPointerException at org.netbeans.modules.java.source.save.CasualDiff.isCommaSeparated(CasualDiff.java:2519) at org.netbeans.modules.java.source.save.CasualDiff.filterHidden(CasualDiff.java:1759) at org.netbeans.modules.java.source.save.CasualDiff.diffClassDef(CasualDiff.java:310) at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:2101) at org.netbeans.modules.java.source.save.CasualDiff.diffListImports(CasualDiff.java:1864) at org.netbeans.modules.java.source.save.CasualDiff.diffTopLevel(CasualDiff.java:135) at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:2095) at org.netbeans.modules.java.source.save.CasualDiff.diff(CasualDiff.java:87) at org.netbeans.modules.java.source.save.Commit.commit(Commit.java:194) at org.netbeans.modules.java.source.save.Commit.visitCompilationUnit(Commit.java:146) Caused: QueryException at org.netbeans.modules.java.source.query.Query.error(Query.java:117) at org.netbeans.modules.java.source.save.Commit.visitCompilationUnit(Commit.java:154) at org.netbeans.modules.java.source.save.Commit.visitCompilationUnit(Commit.java:53) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:476) at org.netbeans.modules.java.source.engine.RootTree.accept(RootTree.java:60) at org.netbeans.modules.java.source.query.Query.apply(Query.java:95) at org.netbeans.modules.java.source.save.Commit.commit(Commit.java:94) [catch] at org.netbeans.api.java.source.WorkingCopy.getChanges(WorkingCopy.java:201) *** This issue has been marked as a duplicate of 102202 ***