1、注意Changesxml格式和下面一定要一样
2、CustomFieldGuid和CustomFieldName都不能少,自定义域的uid和name其中uid或者是MD_PROP_UID_SECONDARY,CustomFieldGuid和自定义域的CustomFieldGuid不一样
3、摸索老长时间才OK,不易呀

 StatusingSvc.Statusing statusingclient = new StatusingSvc.Statusing();
statusingclient.Url = "http://localhost:8888/PWA/_vti_bin/psi/Statusing.asmx";
statusingclient.Credentials = new NetworkCredential("spadmin13", "", "spdev.com");
StatusingSvc.StatusingDataSet statu_dst = statusingclient.ReadStatus(new Guid("bac28f5b-2bda-e511-82f5-463500000031"), DateTime.MinValue, DateTime.MaxValue);
StatusingSvc.StatusingDataSet.AssnCustomFieldsDataTable ass_cus_tb = statu_dst.AssnCustomFields;
//ass_cus_tb[0].TEXT_VALUE = "hello";
string xmldate = @"<Changes>
<Proj ID=""49e853c7-2bda-e511-82f5-463500000031"">
<Assn ID=""bac28f5b-2bda-e511-82f5-463500000031"">
<SimpleCustomFieldChange CustomFieldType=""Text"" CustomFieldGuid=""fc30a9b1-2cda-e511-812a-00155d710610"" CustomFieldName=""交付物完成情况"">hello123</SimpleCustomFieldChange>
</Assn>
</Proj>
</Changes>";
statusingclient.UpdateStatus(xmldate); 上面的代码有点问题出现一个错误
Services.Protocols.SoapException: ProjectServerError(s) LastError=GeneralSecurityAccessDenied Instructions: Pass this into PSClientError constructor to access all error information

缺少resourceuid

<Changes>

    <Proj ID="49e853c7-2bda-e511-82f5-463500000031">

        <Assn ID="3f1b99c5-a8ec-e511-82fe-68f7288204f4" ResID="99d92f87-a7ec-e511-812f-00155d710610">

            <SimpleCustomFieldChange CustomFieldType="Text" CustomFieldGuid="fc30a9b1-2cda-e511-812a-00155d710610" CustomFieldName="交付物完成情况">100%</SimpleCustomFieldChange>

        </Assn>
    </Proj>
</Changes>
 

PWA PSI statusingclient.UpdateStatus更新任务页面的AssnCustomFields的TextValue值的更多相关文章

  1. 通过Web Api 和 Angular.js 构建单页面的web 程序

    通过Web Api 和 Angular.js 构建单页面的web 程序 在传统的web 应用程序中,浏览器端通过向服务器端发送请求,然后服务器端根据这个请求发送HTML到浏览器,这个响应将会影响整个的 ...

  2. [react] 什么是虚拟dom?虚拟dom比操作原生dom要快吗?虚拟dom是如何转变成真实dom并渲染到页面的?

    壹 ❀ 引 虚拟DOM(Virtual DOM)在前端领域也算是老生常谈的话题了,若你了解过vue或者react一定避不开这个话题,因此虚拟DOM也算是面试中常问的一个点,那么通过本文,你将了解到如下 ...

  3. JS魔法堂:定义页面的Dispose方法——[before]unload事件启示录

    前言  最近实施的同事报障,说用户审批流程后直接关闭浏览器,操作十余次后系统就报用户会话数超过上限,咨询4A同事后得知登陆后需要显式调用登出API才能清理4A端,否则必然会超出会话上限.  即使在页面 ...

  4. JavaScript写在Html页面的<head></head>中

    JavaScript写在Html页面的<head></head>中 ----------------- <html> <head> <style ...

  5. 如何将页面的<br/>在Excel中正确换行

    在页面的<br />导致导出Excel中是会以多行的方式显示,达不到页面在一个单元格中进行换行,为此我们有以下两种方式: 1.CSS样式方式 <br style='mso-data- ...

  6. Form提交是会刷新页面的

    今天发现如果页面中有form,点击提交按钮是会刷新页面的,为了禁止页面刷新行为,可以这么做: <form class="form-horizontal" id="u ...

  7. CSS3-基于浮动的布局,响应式WEB设计,定位网页上的元素,设计打印页面的css技术

    基于浮动的布局: 1.除非图片设置了宽度,否则始终应该要对浮动的图片设置一个宽度,这样可以让浏览器给其他内容腾出环绕的空间 2.当侧边栏的高度与主内容区的高度不一致的时候,可以用个margin进行调整 ...

  8. html页面的head标签下

    head区是指首页html代码的<head>和</head>之间的内容.  必须加入的标签  1.公司版权注释  <!--- the site is designed b ...

  9. javascript 如何访问 action或者controller 传给 jsp 页面的值

    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding= ...

随机推荐

  1. zipfile.BadZipFile: File is not a zip file

    zipfile.BadZipFile: File is not a zip file 出现这个问题一般是文件损坏的可能性比较大

  2. 如何彻底禁止手机连接usb,代码实…【转】

    本文转载自:https://blog.csdn.net/jun4331247/article/details/51201825 作为系统第三次被黑的修复方法,捯饬了半天,没效果,最后大神一出手,果然出 ...

  3. poj 2356 Find a multiple【鸽巢原理 模板应用】

    Find a multiple Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6651   Accepted: 2910   ...

  4. DL三(向量化编程 Vectorized implementation)

    向量化编程实现 Vectorized implementation 一向量化编程 Vectorization 1.1 基本术语 向量化 vectorization 1.2 向量化编程(Vectoriz ...

  5. linux应用之xampp集成环境的安装及配置(centos)

    1.xampp集成环境的下载 在xampp的官网上选择对应系统的版本进行下载,官网地址:https://www.apachefriends.org/zh_cn/index.html #wget htt ...

  6. hdu 1003 Max Sum(基础dp)

    Max Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Sub ...

  7. Unity3D之Mesh(一)绘制三角形

    前言: Unity自带几种简单的模型,如cube等:一般情况下,其余模型有3D建模软件生成,以合适的文件格式导入unity中:而mesh(以我目前很粗浅的了解)的一般用途就是:对现有的模型进行变形,以 ...

  8. php如何判断电脑访问还是手机访问?

    手机上网用户数量越来越大,如今各网站都推出了手机网站,电脑用户访问时直接访问电脑版网页,当用户通过手机访问网站时则跳自动跳转到手机版网页,下面给大家分享一段php中判断电脑访问还是手机访问的代码: & ...

  9. centos 静态拨号

    本人系统centos6.5:虚拟机太丑,固ssh. centos的与联网相关的配置文件在 $ /etc/sysconfig/network-scripts DHCP方式-联网 打开文件 $ vim / ...

  10. Oracle忘记用户名密码

    一.oracle 11g登录服务开启 成功安装Oracle 11g后,共有7个服务,这七个服务的含义分别为:1. Oracle ORCL VSS Writer Service:Oracle卷映射拷贝写 ...