先搞到远程接口的描述文件,后缀为.wsdl,借助IDE声成本地类文件,一就是帮助你调用远程接口的文件。程序必须放到“有权访问远程接口的机器”上来运行。使用的时候大概如下:
这是一个wap程序,和jsp无异。
try {
        BSServiceSoapStub binding = (BSServiceSoapStub)new BSServiceLocator().getBSServiceSoap();//这一句全都是辅助类
        i = binding.webMobiledxx(phone, sType);//binding是你真正需要的,他捆绑了所有远程方法
      }
      catch (javax.xml.rpc.ServiceException ex) {
        response.sendRedirect(response.encodeRedirectURL(Configure.get("URL_WAPERROR") + "?error=" + Configure.get("ERROR_BOSS_BUSY")));
        return;
      }
      catch (java.rmi.RemoteException ex) {
        response.sendRedirect(response.encodeRedirectURL(Configure.get("URL_WAPERROR") + "?error=" + Configure.get("ERROR_BOSS_BUSY")));
        return;
      }