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 # : 200709200000 ] [ JDK VERSION : 1.6.2 ] While working with the article Getting Started with JAX-WS Web Services in NetBeans IDE 6.0 [1] I decided to create an ejb that would consume the web service. Created a stateless session bean. Added New Web Service Client within the EJB project. Once the initial skeleton of the slsb has been created, I use Web Service Client Resources > Call Web Service Operation (note there were no methods in the ejb yet). The code put in the ejb likely assumed there's a method within it, but since it was not, it ended up with something like: package org.me.calculator.client; import javax.ejb.Stateless; import javax.xml.ws.WebServiceRef; @Stateless public class CalculatorWS_EJB_ApplicationBean implements CalculatorWS_EJB_ApplicationLocal { @WebServiceRef(wsdlLocation = "http://localhost:8080/CalculatorWSApplication/CalculatorWSService?wsdl") private CalculatorWSService service; try { // Call Web Service Operation org.me.calculator.client.CalculatorWS port = service.getCalculatorWSPort(); // TODO initialize WS operation arguments here int i = 0; int j = 0; // TODO process result here int result = port.add(i, j); System.out.println("Result = "+result); } catch (Exception ex) { // TODO handle custom exceptions here } // Add business logic below. (Right-click in editor and choose // "EJB Methods > Add Business Method" or "Web Service > Add Operation") } which is illegal - try/catch outside any method. [1] http://www.netbeans.org/kb/60/websvc/jax-ws.html
I've just found that it worked this way when using the feature _outside_ a method so it doesn't really matter whether any method's available or not.
Reporter, do you mean that we should generate only injection/helper methods if the action is not invoked from within a body of a method or sth else?
The action should verify that it's been invoked from within a method and open an error window when it has not. It'd also be better off if the action is available only when at least one method existed.
Need to implement the cursor position check.
moving opened issues where TM != dev to TM=TBD
I don't think this is so critical. The simple workaround is to move the code into method. It's the similar problem as if you drag&drop some JSP/HTML component from JSP palette into JSP file - the position isn't checked either. The little difference is that project with incorrect HTML/JSP is buildable unlike the EJB without method. May be some warning message would be appropriate.
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. We apologize for any inconvenience. Thank you. The NetBeans Team