된 VS2010 사전에 프로젝트 서버에
감사를 기존해야합니까? 해결책. VS2012는 WbSvcProject.ProjectSoapClient()를 통해 서비스를 호출하는 새로운 방법을 사용하는 것으로 보입니다.
using Library = Microsoft.Office.Project.Server.Library;
class ProjectProxy
{
private WbSvcProject.Project projectSvc;
public ProjectProxy()
{
this.projectSvc = new WbSvcProject.Project();
this.projectSvc.Url = Program.PWAServer + "/_vti_bin/psi/project.asmx";
this.projectSvc.UseDefaultCredentials = true;
}
//ProjectTeamDataSet ds = new ProjectTeamDataSet();
//ProjectTeamDataSet.ProjectTeamRow row = ds.ProjectTeam.NewProjectTeamRow();
//row.PROJ_UID = projectGuid;
//row.RES_UID = resourceGuid;
//row.NEW_RES_UID = resourceGuid;
//ds.ProjectTeam.AddProjectTeamRow(row);
public void QueueUpdateProjectTeam(Guid sessionUid, Guid projectUid, ProjectTeamDataSet dataset)
{
Guid jobUid = Guid.NewGuid();
try
{
this.projectSvc.QueueUpdateProjectTeam(jobUid, sessionUid, projectUid, dataset);
}
catch (SoapException soapException)
{
List<string> queueErrors = new List<string>();
queueErrors.Add(soapException.Message);
Library.PSClientError clientError = new Library.PSClientError(soapException);
Library.PSErrorInfo[] errors = clientError.GetAllErrors();
foreach (Library.PSErrorInfo error in errors)
{
queueErrors.Add(error.ErrId.ToString());
}
}
}
}