Get item by sharepoint web service jquery

时间:2021-09-15 21:42:14

对于sp2010,在ie浏览器中这个代码无法生效,只有chrome可以生效。

//获取附件id
function GetAttachments(listName) {
var soapEnv = '<?xml version="1.0" encoding="utf-8"?>' +
' <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
' <soap:Body>'+
' <GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">'+
' <listName>'+listName+'</listName>'+
' <viewName></viewName>'+
' <query><Query><Where><And><Contains><FieldRef Name=\'FileRef\'/><Value Type=\'Text\'>'+folderName+'</Value></Contains><Eq><FieldRef Name=\'ContentType\'/><Value Type=\'Text\'>图像</Value></Eq></And></Where></Query></query>'+
' <viewFields></viewFields>'+
' <rowLimit>10</rowLimit>'+
' <queryOptions xmlns:SOAPSDK9="http://schemas.microsoft.com/sharepoint/soap/"><QueryOptions><ViewAttributes Scope="Recursive" /></QueryOptions></queryOptions>'+
' </GetListItems>'+
' </soap:Body>'+
' </soap:Envelope>';
return $.ajax({
async: false,
url: "http://192.168.245.50:81/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: ParseFirstAttachmentURL,
contentType: "text/xml; charset=\"utf-8\""
});
} function ParseFirstAttachmentURL(xmlData, textStatus) {
//alert(xmlData.responseText);
imageURL = $(xmlData.responseXML).find("Attachment").eq(0).text();
}

  

Get item by sharepoint web service jquery的更多相关文章

  1. SharePoint Web service and template

    SharePoint Web service对应的映射列表 WSS Web   Services Web Reference Administration   Service http://<s ...

  2. Visual Studio 2010中创建ASP&period;Net Web Service

    转自:http://blog.csdn.net/xinyaping/article/details/7331375 很多人在论坛里说,在Visual Studio 2010中不能创建“ASP.Net ...

  3. 在 Visual Studio 2010 中创建 ASP&period;Net Web Service

    第一步:创建一个“ASP.Net Empty Web Application”项目 第二步:在项目中添加“Web Service”新项目 第一步之后,Visual Studio 2010会创建一个仅含 ...

  4. (转)在 Visual Studio 2010 中创建 ASP&period;Net Web Service

    很多人在论坛里说,在Visual Studio 2010中不能创建“ASP.Net Web Service”这种project了,下面跟帖者云云,有的说这是因为微软已经将Web Service整合进W ...

  5. 如何使用Web Service新建和更新Wiki页面的内容

    公司内部有很多部门都创建了Wiki库,来做知识共享.公司是Hosting的SharePoint环境,不能写服务器端代码,要操作Wiki只能通过Web Service来完成,所以,碰到两个情况: 1)W ...

  6. SharePoint 2013 APP 开发示例 (五)跨域访问 Web Service (REST API)

          虽然 JQuery 也能通过授权header实现跨域, 但SharePoint 提供了更简单的方法,它被实现在SP.RequestExecutor里 .它能访问跨域的服务包括REST AP ...

  7. Customize the SharePoint 2013 search experience with a Content Enrichment web service

    Did you ever wish you had more control over how your content is indexed and presented as search resu ...

  8. SharePoint 2013 APP 开发示例 (六)服务端跨域访问 Web Service (REST API)

    上个示例(SharePoint 2013 APP 开发示例 (五)跨域访问 Web Service (REST API))是基于JavaScript,运行在web browser内去访问REST AP ...

  9. 在SharePoint中无代码开发InfoPath应用&colon; 一个测试Web Service的工具

    这是这个系列的第一篇,介绍一个小工具,主要是用在Web Service测试的. 因为为了用一点高级的东西,就免不了和web service打交道. 你可以使用按照KB819267来修改web.conf ...

随机推荐

  1. tn文本分析语言&lpar;四&rpar; 实现自然语言计算器

    tn是desert和tan共同开发的一种用于匹配,转写和抽取文本的语言.解释器使用Python实现,代码不超过1000行. github地址:https://github.com/ferventdes ...

  2. sql 查看 锁定的表 或者 未提交 的事务

    --查看锁定的 表select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sy ...

  3. js判断一个字符串是否在另一个字符串中存在 indexOf

    使用indexOf来实现.当返回值为-1时表示不存在. 举例: var href = 'www.51qdq.com';alert(href.indexOf('test')); //返回值 -1aler ...

  4. scrapy下载图片报&lbrack;scrapy&period;downloadermiddlewares&period;robotstxt&rsqb; DEBUG&colon; Forbidden by robots&period;txt&colon;错误

    本文转自:http://blog.csdn.net/zzk1995/article/details/51628205 先说结论,关闭scrapy自带的ROBOTSTXT_OBEY功能,在setting ...

  5. springCloud之配置中心学习

    调试了好久,中与在地址栏输入http://localhost:9004/liyong-test/ms-dev.properties,奇迹出现了,终于可以访问我的配置中心了.这次也是碰运气,并没有觉得会 ...

  6. Java内存分配机制

    内存分配,主要指的是在堆上的分配, 一般的,对象的内存分配都是在堆上进行,但现代技术也支持将对象拆成标量类型(标量类型即原子类型,表示单个值,可以是基本类型或String等),然后在栈上分配,在栈上分 ...

  7. 个人博客作业&lowbar;week14

    M1/M2阶段总结 我在M1阶段负责后端代码的开发,以及协助PM,在M2阶段负责PM,在为期将近一学期的团队软件开发过程中,我深刻体会到了团队协作的重要性,以及合理分配任务的重要性,没有一个好的时间规 ...

  8. Gradle下载类库源码

    https://blog.csdn.net/xiaoxing598/article/details/68958383 备选:https://www.cnblogs.com/yoyotl/p/62917 ...

  9. spring的一些其他功能

    今天看书,知识点多一点了,涉及到了较多的知识,如scheduling计划任务,spring对多线程的支持,以及配置开发.测试和生产环境的profile.这些都是集成在spring中的,需要用时可以参考 ...

  10. java虚拟机学习-Java常量池理解与总结&lpar;13-2&rpar;

    一.相关概念 什么是常量用final修饰的成员变量表示常量,值一旦给定就无法改变!final修饰的变量有三种:静态变量.实例变量和局部变量,分别表示三种类型的常量. Class文件中的常量池在Clas ...