问题描述
如何连接到另一个项目中的wcf服务。我想连接到那个服务方法
这是服务中的方法
公共类UserLoginService:IUserLoginService
{
public bool ValidateUser(CreateUserProfileArg createUserProfileArg)
{
bool Result = false;
// hxUserDTO userLoginArgs = null;
UserLoginArgs userLoginArgs = null;
if(createUserProfileArg!= null)
{
// userLoginArgs = new hxUserDTO() ;
userLoginArgs = new UserLoginArgs();
userLoginArgs.UserId = createUserProfileArg.UserID;
userLoginArgs.Password = createUserProfileArg.Password;
userLoginArgs.UserType = createUserProfileArg.UserTyp e;
userLoginArgs.GroupId = createUserProfileArg.GroupID;
}
结果= UserLoginController.ValidateUserCredentials(userLoginArgs );
返回结果;
}
其中CreateUserProfileArg是一个带有一些参数的类
我需要在我的Windows手机登录页面中调用该方法,并且应该返回一个布尔值
我该怎么办?
Hi,
How to connect to a wcf service which is in another project.I want to connect to that that service method
This is the method in service
public class UserLoginService : IUserLoginService
{
public bool ValidateUser(CreateUserProfileArg createUserProfileArg)
{
bool Result = false;
// hxUserDTO userLoginArgs = null;
UserLoginArgs userLoginArgs = null;
if (createUserProfileArg != null)
{
// userLoginArgs = new hxUserDTO();
userLoginArgs = new UserLoginArgs();
userLoginArgs.UserId = createUserProfileArg.UserID;
userLoginArgs.Password = createUserProfileArg.Password;
userLoginArgs.UserType = createUserProfileArg.UserType;
userLoginArgs.GroupId = createUserProfileArg.GroupID;
}
Result = UserLoginController.ValidateUserCredentials(userLoginArgs);
return Result;
}
where CreateUserProfileArg is a class with some parameters
I need to call that method in my windows phone login page and that should return a Boolean value
How can I do it?
这篇关于在windows8手机中连接到WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!