Blackberry RIM设备,访问java服务器问题

发布于 2024-09-13 07:05:17 字数 5171 浏览 8 评论 0原文

我的项目有问题。异常显示“由于某些临时条件,服务器无法处理消息”。代码在这里,我尝试解决这个问题,但我做不到。

package Kpaket;

import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.*;
import Kpaket.Pmain;
import webserviceOut.LoginWS;
import webserviceOut.*;
import java.rmi.RemoteException;

class LoginScreen extends MainScreen {

 boolean _checked;
 PasswordEditField PasswordField;// invisible type 
 Button btnLogin;
 String space="                       ";
 HorizontalFieldManager hrzManager, hrzManager2;
 EditField EditRef[];
 String EditContext[], LabelRef[]={" Kullanýcý Adý ", " Þifre             "};
 int count_of_component=0;
 LoginWS ws = new LoginWS();
 GetpsWS ps = new GetpsWS();

 public LoginScreen() {

  super(NO_VERTICAL_SCROLL);
  LabelField title = new LabelField("OMEGA YONETIM PANELI", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH | LabelField.FIELD_HCENTER |DrawStyle.HCENTER );
  hrzManager = new HorizontalFieldManager(){
   protected void paintBackground(Graphics graphics)
   {
    graphics.setBackgroundColor(0xcccccc);
    graphics.clear();
    super.paint(graphics);
    }
   };
  hrzManager.add(title);
  this.add(hrzManager);
  boyar(3);
  add( new SeparatorField() );
  EditRef = new EditField[2];
  EditContext = new String[2];

  for(count_of_component = 0; count_of_component < 2; count_of_component++){
   add(new SeparatorField());
   add( new HorizontalField(1, FIELD_HCENTER){
    protected void paintBackground(Graphics graphics)//boyama kýsmýdýr genc..
    {
     graphics.setBackgroundColor(0xcccccc);
     graphics.clear();
     super.paint(graphics);
    }

       { 
        add( new VerticalField(0.50, FIELD_HCENTER){
      {
       add(new LabelField ( LabelRef[count_of_component] ){
        {
         setFont(Font.getDefault().derive(Font.BOLD));;
        }
       });
      }
     });//vertical

     add( new VerticalField(0.50, FIELD_HCENTER) {
      {
       if( LabelRef[count_of_component].equals(" Kullanýcý Adý ") )
           add( EditRef[count_of_component]= new EditField() );
       else
        add( PasswordField = new PasswordEditField());
      }
     });//vertical
    }
   });//add(hfm);
  }
/*  try{
  if( Pmain.osman.loginCheck("bayram", "1").isCheck() == true){

   Dialog.alert(" if e girdim ");
   //UiApplication.getUiApplication().pushScreen( new ptMainScreen() );
  } 
  else{


  }

  }
  catch ( Exception e ){}
*/

  add( new SeparatorField() );
  add( new SeparatorField() );
  add(new HorizontalField(1, FIELD_HCENTER){
   {
    add(new VerticalField(1, FIELD_HCENTER | USE_ALL_WIDTH | DrawStyle.VCENTER){
     {
      btnLogin = new Button (space+"GÝRÝÞ",FIELD_HCENTER){ 
       public void onClick() 
       {
        for(int count_of_component = 0; count_of_component<2; count_of_component++){
         if(count_of_component == 0){
          EditContext[count_of_component] = EditRef[count_of_component].getText();
         }
         if(count_of_component ==1){
          EditContext[count_of_component] = PasswordField.getText();
         }
        }  
        deneme();
        /*        

         * try{
         ws = Pmain.owner.loginCheck(EditContext[0], EditContext[1]);
        }
        catch( Exception e ){
         Dialog.alert(e.getMessage()+"ben burdayým dior");
        }
*/        
        //_checked = kullaniciGirisi();
        //if(_checked == true)
        // UiApplication.getUiApplication().pushScreen( new ptMainScreen() );
        //else
        // Dialog.alert(" HAtalý giris ");

       }
       public int getPreferredWidth() {

        return getScreen().getWidth();
       }

       public void setLabel(String label) {

       }

      };

         add(btnLogin);
     }
    });

   }
  });
  add( new SeparatorField() );
  boyar(5);
 }
 public boolean onClose(){

  String msg = new String( " sistem kapatýlýyor " );

  Dialog.alert(msg);
  System.exit( 0 );
  return( true );
 }
 public void boyar(int kacblok ){
  for(int i=0; i<kacblok; i++){
   hrzManager2 = new HorizontalFieldManager(){
    protected void paintBackground(Graphics graphics)
     {
      graphics.setBackgroundColor(0x00382B79);
      graphics.clear();
      super.paint(graphics);
      }
     };
   hrzManager2.add(new LabelField(" ", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH));

   this.add(hrzManager2);

     } 
 }
 public boolean kullaniciGirisi(){

  int checked = 0;


  try{
   ws = Pmain.owner.loginCheck(EditContext[0], EditContext[1]);
   Dialog.alert(" bu þekilde bir yere varamazsýn ");
   if(ws.isCheck()== true){
    checked =1;
   }
   else{
    checked = 0;
   }

  }
  catch( Exception e ){
   if(ws.isCheck()== true){
    checked =1;
   }
   if( ws.isCheck() == false ){
    Dialog.alert(" ikinci if e girdim ");
    checked = 0;
   }
   Dialog.alert(e.getMessage()+"ben burdayým dior");

  }
  if( checked ==1 ){
   return true;
  }
  else{
   Dialog.alert( checked +"");
   return  false;
  }





 }
 public void deneme(){
  try { ps =  Pmain.owner.getPS("bayram", "1");
  Dialog.alert( ps.getPs() + " kisisel ");
 }
 catch( RemoteException e ){ Dialog.alert(" getpsWS.ex  "+e.getMessage()); }

 }
}

ı have a problem with my project. the exception says " Server cannot handle the message because of some temporary condition " .The code is here, ı try to salve this problem but ı couldn't..

package Kpaket;

import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.*;
import Kpaket.Pmain;
import webserviceOut.LoginWS;
import webserviceOut.*;
import java.rmi.RemoteException;

class LoginScreen extends MainScreen {

 boolean _checked;
 PasswordEditField PasswordField;// invisible type 
 Button btnLogin;
 String space="                       ";
 HorizontalFieldManager hrzManager, hrzManager2;
 EditField EditRef[];
 String EditContext[], LabelRef[]={" Kullanýcý Adý ", " Þifre             "};
 int count_of_component=0;
 LoginWS ws = new LoginWS();
 GetpsWS ps = new GetpsWS();

 public LoginScreen() {

  super(NO_VERTICAL_SCROLL);
  LabelField title = new LabelField("OMEGA YONETIM PANELI", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH | LabelField.FIELD_HCENTER |DrawStyle.HCENTER );
  hrzManager = new HorizontalFieldManager(){
   protected void paintBackground(Graphics graphics)
   {
    graphics.setBackgroundColor(0xcccccc);
    graphics.clear();
    super.paint(graphics);
    }
   };
  hrzManager.add(title);
  this.add(hrzManager);
  boyar(3);
  add( new SeparatorField() );
  EditRef = new EditField[2];
  EditContext = new String[2];

  for(count_of_component = 0; count_of_component < 2; count_of_component++){
   add(new SeparatorField());
   add( new HorizontalField(1, FIELD_HCENTER){
    protected void paintBackground(Graphics graphics)//boyama kýsmýdýr genc..
    {
     graphics.setBackgroundColor(0xcccccc);
     graphics.clear();
     super.paint(graphics);
    }

       { 
        add( new VerticalField(0.50, FIELD_HCENTER){
      {
       add(new LabelField ( LabelRef[count_of_component] ){
        {
         setFont(Font.getDefault().derive(Font.BOLD));;
        }
       });
      }
     });//vertical

     add( new VerticalField(0.50, FIELD_HCENTER) {
      {
       if( LabelRef[count_of_component].equals(" Kullanýcý Adý ") )
           add( EditRef[count_of_component]= new EditField() );
       else
        add( PasswordField = new PasswordEditField());
      }
     });//vertical
    }
   });//add(hfm);
  }
/*  try{
  if( Pmain.osman.loginCheck("bayram", "1").isCheck() == true){

   Dialog.alert(" if e girdim ");
   //UiApplication.getUiApplication().pushScreen( new ptMainScreen() );
  } 
  else{


  }

  }
  catch ( Exception e ){}
*/

  add( new SeparatorField() );
  add( new SeparatorField() );
  add(new HorizontalField(1, FIELD_HCENTER){
   {
    add(new VerticalField(1, FIELD_HCENTER | USE_ALL_WIDTH | DrawStyle.VCENTER){
     {
      btnLogin = new Button (space+"GÝRÝÞ",FIELD_HCENTER){ 
       public void onClick() 
       {
        for(int count_of_component = 0; count_of_component<2; count_of_component++){
         if(count_of_component == 0){
          EditContext[count_of_component] = EditRef[count_of_component].getText();
         }
         if(count_of_component ==1){
          EditContext[count_of_component] = PasswordField.getText();
         }
        }  
        deneme();
        /*        

         * try{
         ws = Pmain.owner.loginCheck(EditContext[0], EditContext[1]);
        }
        catch( Exception e ){
         Dialog.alert(e.getMessage()+"ben burdayým dior");
        }
*/        
        //_checked = kullaniciGirisi();
        //if(_checked == true)
        // UiApplication.getUiApplication().pushScreen( new ptMainScreen() );
        //else
        // Dialog.alert(" HAtalý giris ");

       }
       public int getPreferredWidth() {

        return getScreen().getWidth();
       }

       public void setLabel(String label) {

       }

      };

         add(btnLogin);
     }
    });

   }
  });
  add( new SeparatorField() );
  boyar(5);
 }
 public boolean onClose(){

  String msg = new String( " sistem kapatýlýyor " );

  Dialog.alert(msg);
  System.exit( 0 );
  return( true );
 }
 public void boyar(int kacblok ){
  for(int i=0; i<kacblok; i++){
   hrzManager2 = new HorizontalFieldManager(){
    protected void paintBackground(Graphics graphics)
     {
      graphics.setBackgroundColor(0x00382B79);
      graphics.clear();
      super.paint(graphics);
      }
     };
   hrzManager2.add(new LabelField(" ", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH));

   this.add(hrzManager2);

     } 
 }
 public boolean kullaniciGirisi(){

  int checked = 0;


  try{
   ws = Pmain.owner.loginCheck(EditContext[0], EditContext[1]);
   Dialog.alert(" bu þekilde bir yere varamazsýn ");
   if(ws.isCheck()== true){
    checked =1;
   }
   else{
    checked = 0;
   }

  }
  catch( Exception e ){
   if(ws.isCheck()== true){
    checked =1;
   }
   if( ws.isCheck() == false ){
    Dialog.alert(" ikinci if e girdim ");
    checked = 0;
   }
   Dialog.alert(e.getMessage()+"ben burdayým dior");

  }
  if( checked ==1 ){
   return true;
  }
  else{
   Dialog.alert( checked +"");
   return  false;
  }





 }
 public void deneme(){
  try { ps =  Pmain.owner.getPS("bayram", "1");
  Dialog.alert( ps.getPs() + " kisisel ");
 }
 catch( RemoteException e ){ Dialog.alert(" getpsWS.ex  "+e.getMessage()); }

 }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

波浪屿的海角声 2024-09-20 07:05:17

暂时性交的解决办法是稍等片刻,然后重试。

The solution to a temporary coition is to wait a bit and retry.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文