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. [转载]设计模式的UML图

    1.抽象工厂(Abstract Factory)模式 意图:为特定的客户(或情况)提供特定系列的对象. 2.类的适配器(Adapter)模式 意图:将一个类的接口转换成客户希望的另外一个接口. 3.对 ...

  2. 使用django开发一个博客

    环境: MAC 10.10.5  Yosemite Python 3.73 Django 代码托管 github

  3. Python 面试题(上)

    Python语言特性 1 Python的函数参数传递 看两个例子: a = 1 deffun(a): a = 2 fun(a) printa # 1 a = [] deffun(a): a.appen ...

  4. HR_ROS 节点信息

    https://stackoverflow.com/questions/24638063/install-node-serialport-module-on-arm-linux https://blo ...

  5. Hadoop1.x Shell命令

    refer to http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_shell.html FS Shell 调用文件系统(FS)Shell命令应使用 bin/h ...

  6. 每天一个Linux命令(21)find命令_xargs参数

    xargs 与 exec 的作用类似,但是xargs与find 一起使用时,一般配合管道一起使用. 前面的输出转换为后方指令的参数输入,使用exec和xargs可以使用户对所匹配到的文件执行几乎所有的 ...

  7. python的property属性

    最近看书中关于Python的property()内建函数属性内容时<python核心编程>解释的生僻难懂,但在网上看到了一篇关于property属性非常好的译文介绍. http://pyt ...

  8. 【转】RMQ-ST算法详解

    地址:http://blog.csdn.net/z287438743z/article/details/8132806 RMQ(Range Minimum/Maximum Query)问题就是求区间最 ...

  9. LINQ 学习路程 -- 查询操作 Join

    Join操作是将两个集合联合 Joining Operators Usage Join 将两个序列连接并返回结果集 GroupJoin 根据key将两个序列连接返回,像是SQL中的Left Join ...

  10. Oracle创建函数

    --创建函数语法 create [or replace] function [schema.]function_name (函数参数列表) --参数有IN.OUT.IN OUT三种类型:IN代表需要输 ...