// !!!下面的jndi填什么呢?
      Object objRef = ic.lookup("ejb/converter");
      
当然填你的ejb的jndi,和jsp完全一样呀...
有什么问题吗?

解决方案 »

  1.   

    我的服务是发布在本地机器上的,把生成的客户存根jar文件和Application copy到远程机器上,运行Application,不行啊。
      

  2.   

    InitialContext ic = new InitialContext();
          改成:
    Hashtable ht = new Hashtable();
        ht.put(ctx.PROVIDER_URL, "t3://远程ip:端口" );
        ht.put(ctx.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
        ic = new InitialContext(ht);
      

  3.   

    加上下面的:
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, "t3://localhost:7001");
      

  4.   

    我没有用weblogic server啊,我用的是j2sdkee1.3。
    明天我找个地方把源码放上去。
      

  5.   

    我改了一下代码,重新发布了一下,还是不行。
    这回我把我的代码放到网上:session bean和jsp源码:
    http://learn.tsinghua.edu.cn/homepage/037821/app/cvt2/src.rarapplication client源码:
    http://learn.tsinghua.edu.cn/homepage/037821/app/cvt2/srcClient.rar发布后的ear:
    http://learn.tsinghua.edu.cn/homepage/037821/app/cvt2/cvt2.ear发布后生成的客户存根jar:
    http://learn.tsinghua.edu.cn/homepage/037821/app/cvt2/cvt2Client.jar