iPhone的Wcf服务 [英] Wcf Services for IPhone
问题描述
hai,
我写了许多 wcf 服务.这些wcf服务正在网站上运行..现在我想为 Iphone ...修改这些wcf服务....
我正在发布小型服务..如果该服务正常工作,那么我将修改所有服务
例如:我要修改此现有服务
IRoleService.cs:
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用System.Text;
使用System.ServiceModel;
命名空间ICloudServices
{
[ServiceContract]
公共接口IRoleService
{
[OperationContract]
GetRoleResponse Get(GetRoleRequest getRoleRequest);
}
}
RoleService.cs:
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用System.Text;
使用System.ServiceModel;
命名空间ICloudServices
{
公共类RoleService:IRoleService
{
公共GetRoleResponse Get(GetRoleRequest getRoleRequest)
{
GetRoleResponse getRoleResponse = null;
试试
{
getRoleResponse = RoleBLL.Get(getRoleRequest);
}
捕获(BaseException ex)
{
抛出新的FaultException(例如摘要);
}
return getRoleResponse;
}
请帮帮我...
谢谢
hai,
I written many wcf services..these wcf services are working in websites....now i want to modify these wcf services for IPhone....
I am posting small service..If this service work correctly then I''ll modify all services
Ex:I want to Modify This existing service
IRoleService.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
namespace ICloudServices
{
[ServiceContract]
public interface IRoleService
{
[OperationContract]
GetRoleResponse Get(GetRoleRequest getRoleRequest);
}
}
RoleService.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
namespace ICloudServices
{
public class RoleService:IRoleService
{
public GetRoleResponse Get(GetRoleRequest getRoleRequest)
{
GetRoleResponse getRoleResponse = null;
try
{
getRoleResponse = RoleBLL.Get(getRoleRequest);
}
catch (BaseException ex)
{
throw new FaultException(ex.Summary);
}
return getRoleResponse;
}
Please help me...
Thank you
推荐答案
您是否已选中此项.
http://www.iphonedevsdk.com/forum/iphone-sdk-development/39819-how-to-call-wcf-service.html [ http://stackoverflow.com/questions/6011595/upload-image-from- iphone-to-wcf-service [ ^ ]
Have you checked this.
http://www.iphonedevsdk.com/forum/iphone-sdk-development/39819-how-to-call-wcf-service.html[^]
http://stackoverflow.com/questions/6011595/upload-image-from-iphone-to-wcf-service[^]
这篇关于iPhone的Wcf服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!