Hi
I am new to web services. I am developing
EJB 3.0 as a WebService using JDeveloper 11 with inbuilt WebLogic Server. Where i haven't used ejb-jar.xml, but it's saying the following error:
ejb "AdhocCountAdminBean" doesn't have a web service view in ejb-jar.xml
Please give me an idea to resolve this issue. The code is below:
//Remote Interface
package oracle.retail.sim.closed.adhoc.ejb;
import javax.ejb.Remote;
import oracle.retail.sim.closed.util.CompressedObject;
@Remote
public interface AdhocCountAdminInterface {
public abstract CompressedObject findAllAdhocCountAdmins(CompressedObject compressed0, CompressedObject compressedSimSession)
throws Exception;
public abstract CompressedObject update(CompressedObject compressed0, CompressedObject compressedSimSession)
throws Exception;
}
//Bean class (Service end point)
package oracle.retail.sim.closed.adhoc.ejb;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.ejb.*;
import javax.jws.WebMethod;
import javax.jws.WebService;
import oracle.retail.sim.closed.ejb.AbstractSimServiceBean;
import oracle.retail.sim.closed.logging.LogNames;
import oracle.retail.sim.closed.logging.LogService;
import oracle.retail.sim.closed.util.SimSession;
import oracle.retail.sim.closed.util.UniversalContext;
import oracle.retail.sim.closed.util.CompressedObject;
import oracle.retail.sim.closed.adhoc.AdhocCountAdminServices;
@Stateless(name = "AdhocCountAdminBean", mappedName = "App4-Pr4-AdhocCountAdmin")
@Remote
@WebService
public class AdhocCountAdminBean extends AbstractSimServiceBean<AdhocCountAdminServices> implements AdhocCountAdminInterface
{
private static final long serialVersionUID = 5678192564072816382L;
private static final String SERVICE_KEY = "AdhocCountAdminServices.SERVER_IMPL";
@WebMethod
public CompressedObject findAllAdhocCountAdmins(CompressedObject compressed0, CompressedObject compressedSimSession)
throws Exception {
long startTime = System.currentTimeMillis();
LogService.debug(LogNames.SERVICE_TIMINGS, "Starting service method: AdhocCountAdminBean.findAllAdhocCountAdmins()");
try {
java.lang.Long arg0 = (java.lang.Long) compressed0.recoverObject();
SimSession session = (SimSession) compressedSimSession.recoverObject();
UniversalContext.setSession(session); // copy the SimSession from client request
Object retObj = getService(SERVICE_KEY).findAllAdhocCountAdmins(arg0);
return new CompressedObject(retObj);
} catch (Throwable t) {
handleException(t, "findAllAdhocCountAdmins", true);
return null;
} finally {
completeServiceContext();
long endTime = System.currentTimeMillis();
LogService.debug(LogNames.SERVICE_TIMINGS, "Took " + (endTime - startTime) + "ms. for invocation of: AdhocCountAdminBean.findAllAdhocCountAdmins()");
}
}
@WebMethod
public CompressedObject update(CompressedObject compressed0, CompressedObject compressedSimSession)
throws Exception {
long startTime = System.currentTimeMillis();
LogService.debug(LogNames.SERVICE_TIMINGS, "Starting service method: AdhocCountAdminBean.update()");
try {
java.util.List<oracle.retail.sim.closed.adhoc.AdhocCountAdmin> arg0 = (java.util.List<oracle.retail.sim.closed.adhoc.AdhocCountAdmin>) compressed0.recoverObject();
SimSession session = (SimSession) compressedSimSession.recoverObject();
UniversalContext.setSession(session); // copy the SimSession from client request
getService(SERVICE_KEY).update(arg0);
return new CompressedObject(null);
} catch (Throwable t) {
handleException(t, "update", true);
return null;
} finally {
completeServiceContext();
long endTime = System.currentTimeMillis();
LogService.debug(LogNames.SERVICE_TIMINGS, "Took " + (endTime - startTime) + "ms. for invocation of: AdhocCountAdminBean.update()");
}
}
}