users@glassfish.java.net

Cannot access WAR webservices from EJB if deployed in an EAR

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Apr 2010 09:10:47 PDT

I'm having this problem with Netbeans 6.1 and Glassfish v2.1.

I have a web project (WAR) that has 4 web services. I have an EJB project (JAR) that has 4 web service client connectors to these web services. Our environment is distributed so basically server A has the same code as server B... the web service connectors in server A will talk to the web services in server B. Everything works fine when I deploy the EJB JAR and the WAR to Glassfish separately. However, when I put them into an EAR and deploy the EAR I get the following error messages:

Class webservice.ReaderWS is annotated with @WebService and without @Stateless but is packaged in a JAR. If it is supposed to be a servlet endpoint, it should be packaged in a WAR; Deployment will continue assuming this class to be just a POJO used by other classes in the JAR being deployed
 symbol: javax.jws.WebService
 location: class webservice.ReaderWS
Class webservice.RestoreWS is annotated with @WebService and without @Stateless but is packaged in a JAR. If it is supposed to be a servlet endpoint, it should be packaged in a WAR; Deployment will continue assuming this class to be just a POJO used by other classes in the JAR being deployed
 symbol: javax.jws.WebService
 location: class webservice.RestoreWS
Class webservice.ProcessDnote is annotated with @WebService and without @Stateless but is packaged in a JAR. If it is supposed to be a servlet endpoint, it should be packaged in a WAR; Deployment will continue assuming this class to be just a POJO used by other classes in the JAR being deployed
 symbol: javax.jws.WebService
 location: class webservice.ProcessDnote
Class webservice.HGTInboxWS is annotated with @WebService and without @Stateless but is packaged in a JAR. If it is supposed to be a servlet endpoint, it should be packaged in a WAR; Deployment will continue assuming this class to be just a POJO used by other classes in the JAR being deployed
 symbol: javax.jws.WebService
 location: class webservice.HGTInboxWS
Annotations processing failed for C:\Program Files\glassfish-v2\domains\domain1\applications\j2ee-apps\ESP\HGTCoreEJB_jar
wsgen successful
wsgen successful
wsgen successful
wsgen successful
DPL5306:Servlet Web Service Endpoint [ReaderWS] listening at address [http://BRENT-LT.HIGTEK.local:8080/HGTWebApp/ReaderWSService]
DPL5306:Servlet Web Service Endpoint [ProcessDnote] listening at address [http://BRENT-LT.HIGTEK.local:8080/HGTWebApp/ProcessDnoteService]
DPL5306:Servlet Web Service Endpoint [HGTInboxWS] listening at address [http://BRENT-LT.HIGTEK.local:8080/HGTWebApp/HGTInboxWSService]
DPL5306:Servlet Web Service Endpoint [RestoreWS] listening at address [http://BRENT-LT.HIGTEK.local:8080/HGTWebApp/RestoreWSService]

I don't understand this because the @WebService annotated web service classes are NOT in the JAR.... they are in the WAR.

Then when I try to connect from the EJB via the client connector I get this:

com.higtek.mdb.LocalMessageMDBBean.handleReaderCommunique():webservice.ReaderWS is not an interface
Result = webservice.ReaderWS is not an interface

I've been scouring the internet for answers on this. I'm trying to package the 2 projects into the same EAR so I can use the @Local interface instead of the @Remote interface on my EJBs. I have only found one other mention of this issue over on the netbeans forums: forums.netbeans.org/viewtopic.php?t=15361

Any help would be greatly appreciated as I'm totally stuck... Thanks!
[Message sent by forum member 'brentfrederick']

http://forums.java.net/jive/thread.jspa?messageID=395959