it will be more or less same like the standalone client looking up EJB
as the caller will be sitting on one JVM and calee will be on another JVM
which will be something like this
InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("ServiceNameYouWantToLookUp");
if you need to specify some properties then you need to go like this
props.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
props.put("java.naming.provider.url", "localhost:1099");//provide the EJB service address and port
Context context = new InitialContext(props);
this is for jboss. ihope similar things will be available for you in WAS as well