Blackberry RIM设备,访问java服务器问题
我的项目有问题。异常显示“由于某些临时条件,服务器无法处理消息”。代码在这里,我尝试解决这个问题,但我做不到。
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
暂时性交的解决办法是稍等片刻,然后重试。
The solution to a temporary coition is to wait a bit and retry.