import java.util.Properties; import javax.naming.InitialContext; import com.fhn.vismp.service.ejbservice.customer.OrderService; public class ejbclientWancp { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Properties props = new Properties(); props.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); props.setProperty("java.naming.provider.url", "127.0.0.1:1099"); props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming"); try { InitialContext ctx = new InitialContext(props); String offInstanceId = "035892914555"; OrderService bean = (OrderService)ctx.lookup("OrderServiceImpl/remote"); } catch (Exception e) { e.printStackTrace(); } } }