Note that there are some explanatory texts on larger screens.

plurals
  1. PODeploying web services in java
    primarykey
    data
    text
    <p>I have a java web service. The actual operations of it are not important. But what is important is the return value. It is returning a class I created called <code>GetReturnCapsule</code>.</p> <pre> <code> /** * Web service operation */ @WebMethod(operationName = "get") public GetReturnCapsule get(@WebParam(name = "company") final String company, @WebParam(name = "timeStamp") final long timeStamp, @WebParam(name = "hash") final int hash) { ...stuff } </code> </pre> <p>Here is the return capsule code. Its pretty much just a wrapper for some data.</p> <pre> <code> public class GetReturnCapsule { long timeStamp; List ips; int hash; public GetReturnCapsule(long timeStamp,Listips,int hash) { this.timeStamp = timeStamp; this.ips = ips; this.hash = hash; } public long getTimeStamp() { return timeStamp; } public int getHash() { return hash; } public List getIPs() { return ips; } } </code> </pre> <p>The webservice compiles correctly. However, when I try to deploy it, it get the following error from Glashfish.</p> <pre> <code> SEVERE: Class [ com/compunetix/vsd/stix/server/webservices/GetReturnCapsule ] not found. Error while loading [ class com.compunetix.vsd.stix.server.webservices.GetIp ] SEVERE: Class [ com/compunetix/vsd/stix/server/webservices/GetReturnCapsule ] not found. Error while loading [ class com.compunetix.vsd.stix.server.webservices.GetIp ] SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer prepare method SEVERE: Exception while preparing the app SEVERE: Exception while preparing the app : Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging for C:\Documents and Settings\dvargo\My Documents\STix1030Netbeans\STixWebService\build\web SEVERE: Class [ com/compunetix/vsd/stix/server/webservices/GetReturnCapsule ] not found. Error while loading [ class com.compunetix.vsd.stix.server.webservices.GetIp ] SEVERE: Class [ com/compunetix/vsd/stix/server/webservices/GetReturnCapsule ] not found. Error while loading [ class com.compunetix.vsd.stix.server.webservices.GetIp ] SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbDeployer prepare method SEVERE: Exception while preparing the app SEVERE: Exception while preparing the app : Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging for C:\Documents and Settings\dvargo\My Documents\STix1030Netbeans\STixWebService\build\web </code> </pre> <p>My main question is, can is it possible to actually return a custom class using java web services. My second question is, any idea on how I can fix this based off of these error messages?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload