0
我正在处理一个示例,即时通讯尝试使用web服务在.net c#中,我有一些问题。我有一个在Web服务的方法:flex 4.5 + wbservice .net
public string login(string user, string pass)
{
//string msg = "";
string res = "";
person n = new person(user, pass);
if (n.login())
{
Session["user"] = Server.HtmlEncode(u);
setTimeOutLogIn(u);
res = u;
}
else
{
// msg = "Error";
}
return res;
}
现在有了这个
我返回一个字符串的柔性来对用户的状态的唯一用户。
我的疑问是,我如何在弹性会议上正常工作?
其他问题和问题在这里,并且是一个大问题: 什么时候向webservice发出任何请求flex只回答第二个问题。例如:
public function LogUser()
{
var name:String=Login.text;
var pass:String=Password.text;
Service.login.send(name, pass);
checkLogin();
}
public function checkLogin():Boolean
{
var boll:Boolean= new Boolean;
Service.checkLogin.send(util);
boll = Service.checkLogin.lastResult;
if(boll==false)
{
Llogout.visible=false;
Lregist.visible=true;
Llogin.visible=true;
Luser.visible=false;
currentState="default";
}
else
{
Llogin.visible=false;
Llogout.visible=true;
Lregist.visible=false;
Luser.visible=true;
Luser.text=util;
currentState="default";
}
return boll;
}
<s:operation name="login"> </s:operation>
<s:operation name="checkLogin" result="checkLog()"></s:operation>
</s:WebService>
这个简单的操作仅在第二次正确地做出响应。
有什么想法?
对不起,您的问题