要做一个注册的webservice注册登录接口,但是对方提供过来的注册方法是这样的:
public int Register(RegisterEntity item)并需提供以下参数:
RegisterEntity.Login(string) 用户名
RegisterEntity.Password(string) 密码
RegisterEntity.ConfirmPassword(string) 确认密码
RegisterEntity.Email(string) 邮箱
RegisterEntity.Mobile(string) 手机号我个人是做PHP的,也做些ASP,.net不熟,所以不知道该怎么理解这个。
同时对方提供的登录方法 public int Logto(string login,string password,)我登录的照猫画虎地描了下,用以下的代码行的通,可是,碰到注册这个我就搞不明了,主要是没弄明白RegisterEntity该怎么理解和使用,哪位大侠能帮忙写个示例吗?登录的示例,麻烦能在我上面改改吗? string login = loginname.Text.Trim();
string pass = password.Text.Trim();
KUN.SchoolService user = new KUN.SchoolService();
if (user.Logto(login, pass)==1)
{
Response.Write("OK"); }
else
{
Response.Write("false");
}
public int Register(RegisterEntity item)并需提供以下参数:
RegisterEntity.Login(string) 用户名
RegisterEntity.Password(string) 密码
RegisterEntity.ConfirmPassword(string) 确认密码
RegisterEntity.Email(string) 邮箱
RegisterEntity.Mobile(string) 手机号我个人是做PHP的,也做些ASP,.net不熟,所以不知道该怎么理解这个。
同时对方提供的登录方法 public int Logto(string login,string password,)我登录的照猫画虎地描了下,用以下的代码行的通,可是,碰到注册这个我就搞不明了,主要是没弄明白RegisterEntity该怎么理解和使用,哪位大侠能帮忙写个示例吗?登录的示例,麻烦能在我上面改改吗? string login = loginname.Text.Trim();
string pass = password.Text.Trim();
KUN.SchoolService user = new KUN.SchoolService();
if (user.Logto(login, pass)==1)
{
Response.Write("OK"); }
else
{
Response.Write("false");
}
user.Register(new RegisterEntity()
{
Login = loginname.Text.Trim(),
Password = password.Text.Trim(),
ConfirmPassword = password.Text.Trim(),
Email = "[email protected]",
Mobile = "13000000000"
});
我怎么获得返回值呢?出现调试错误:找不到类型或命名空间名称“RegisterEntity”(是否缺少 using 指令或程序集引用?)行:user.Register(new RegisterEntity()
string pass = Password.Text.Trim();
string pass2 = ConfirmPassword.Text.Trim();
string mail = Email.Text.Trim();
string mob = Mobile.Text.Trim();
bool ma = true;
bool sms = true;
bool xy = true;
string key = "dwdgtf";
KUN.SchoolService user = new KUN.SchoolService();
if (user.Register(new RegisterEntity()
{
Login = name,
Password = pass,
ConfirmPassword = pass2,
Email = mail,
Mobile = mob,
EmailOption = ma,
SMSOption = sms,
AcceptAgreement = xy,
}, key)==1){ Response.Write("yes");
}
else{
Response.Write("no");
}
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Register xmlns="http://www.kls-china.com/">
<item>
<Login>string</Login>
<Password>string</Password>
<ConfirmPassword>string</ConfirmPassword>
<Email>string</Email>
<Mobile>string</Mobile>
<EmailOption>boolean</EmailOption>
<SMSOption>boolean</SMSOption>
<AcceptAgreement>boolean</AcceptAgreement>
</item>
<key>string</key>
</Register>
</soap:Body>
</soap:Envelope>
[/code]
new KUN.RegisterEntity();来实例化 应该是少了一个命名空间