• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

ejb "AdhocCountAdminBean" doesn't have a web service view in ejb-jar.xml

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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()");
}
}
}
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Have you tried annotating the AdhocCountAdminInterface interface with the @WebService annotation?
Best wishes!
 
d krishnamohan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried "AdhocCountAdminInterface" with @WebService annotation, But I could not find the option "Test WebService".
Please tell me how to test the application?
 
d krishnamohan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tested the same application with simple method like
int add(int a, int b){ return (a+b);}, it's running. But when a take the methods with some class object as argument/return value, it's giving "ejb "AdhocCountAdminBean" doesn't have a web service view in ejb-jar.xml" error.

Please give me an idea to resolve it. Thanks in advance.
reply
    Bookmark Topic Watch Topic
  • New Topic