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.

Bug 102813 - "service" not declared in a @WebserviceRef annotation
Summary: "service" not declared in a @WebserviceRef annotation
Status: RESOLVED DUPLICATE of bug 101395
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-WS (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@webservices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-27 19:11 UTC by Jim Fu
Modified: 2007-04-27 19:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screen shot dragging WS ref node -> stateless session bean method body (147.18 KB, image/gif)
2007-04-27 19:13 UTC, Jim Fu
Details
the EJBModule contains WSDLs + XSDs (145.76 KB, application/octet-stream)
2007-04-27 19:17 UTC, Jim Fu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Fu 2007-04-27 19:11:28 UTC
when creating java ee se project, dragging web service reference into the method
body of a stateless session bean's exposed web service methods throws NPE (see
below )- and ignore it and proceed further, the resulted impl code has a
variable reference "service" without its declaration (also see below):

the NPE thrown:
================================
ava.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)
	at org.netbeans.api.java.source.WorkingCopy.getChanges(WorkingCopy.java:201)
	at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:686)
	at
org.netbeans.modules.websvc.core.jaxws.actions.JaxWsCodeGenerator.insertMethod(JaxWsCodeGenerator.java:927)
	at
org.netbeans.modules.websvc.core.jaxws.nodes.OperationEditorDrop.handleTransfer(OperationEditorDrop.java:57)
	at
org.openide.text.QuietEditorPane$DelegatingTransferHandler.importData(QuietEditorPane.java:227)
	at javax.swing.TransferHandler$DropHandler.drop(TransferHandler.java:690)
	at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
	at javax.swing.TransferHandler$SwingDropTarget.drop(TransferHandler.java:609)
	at
org.openide.text.QuietEditorPane$DelegatingDropTarget.drop(QuietEditorPane.java:363)
	at
sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
	at
sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
	at
sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
	at
sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
	at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
	at java.awt.Component.dispatchEventImpl(Component.java:3826)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:3963)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3817)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1778)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Impl Code Generated:
==================================
/**
 *
 * @author jfu
 */
@WebService(serviceName = "FILEService", portName = "FILEPort",
endpointInterface = "org.netbeans.j2ee.wsdl.file.FILEPortType", targetNamespace
= "http://j2ee.netbeans.org/wsdl/FILE", wsdlLocation =
"META-INF/wsdl/LocalFileService/FILE.wsdl")
@Stateless
public class LocalFileService implements FILEPortType {

    public LocalFileService() {
    }

    public org.netbeans.xml.schema.responsemessageschema.ResponseType
fileOperation(org.netbeans.xml.schema.requestmessageschema.RequestType part1) {
        // TODO implement this method
        
        
        try { // Call Web Service Operation
            client.FTPJOEPortType port = service.getFTPJOEPort(); <==== service
not declared
            // TODO initialize WS operation arguments here
            client.RequestType part1 = null;
            // TODO process result here
            client.ResponseType result = port.ftpJOEOperation(part1);
            System.out.println("Result = "+result);
        } catch (Exception ex) {
            // TODO handle custom exceptions here
        }
        throw new UnsupportedOperationException("Not implemented yet.");
    }
}
Comment 1 Jim Fu 2007-04-27 19:13:08 UTC
Created attachment 41864 [details]
screen shot dragging WS ref node -> stateless session bean method body
Comment 2 Lukas Jungmann 2007-04-27 19:16:35 UTC

*** This issue has been marked as a duplicate of 101395 ***
Comment 3 Jim Fu 2007-04-27 19:17:11 UTC
Created attachment 41865 [details]
the EJBModule contains WSDLs + XSDs