在J2ME中访问dotnet Web Services[2]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

nbsp;  }
      if (sLoginPwd.length() == 0) {
        error("Input password please!");
        return;
      }
      //Call .NET XML WebServices
      Thread t = new Thread() { //一定要新开线程,避免锁定屏幕
        public void run() {
          try {
            boolean loginResult = service.login(sLoginUserID, sLoginPwd); //Method:Login()
            if (loginResult == false) {
              error("You have no permission login.");
            }
            else {
              display.setCurrent(MainForm);
            }
          }
          catch (Exception e) {
            if (!EXIT_STRING.equals(e.getMessage())) {
              e.printStackTrace();
              error("Connection problems.\n"
                    + "Check your internet/proxy settings.");
            }
          }
        }
      };
      t.start();
    }
    OK,到此,你就搞定了!
    J2ME call the dotnet Web Services!
    简单吧!

本文关键:在J2ME中访问dotnet Web Services
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top