用于iphone开发的GetListItems Web服务的Soap请求

时间:2009-12-15 12:53:06

标签: iphone sharepoint soap

我正在为sharePoint开发一个用于soap请求的iphone应用程序,即GetListItems Web服务。但我得到了不同类型的例外,我对iphone和肥皂请求都很新。

错误是: - “Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

我的xml代码是: -

NSString *soapMessage = [NSString stringWithFormat:
                         @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
                         "<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\"> \n"
                         "<soap:Body> \n"
                         "<GetListItems xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\">\n"
                         "<listName>@""</listName>\n"
                         "<viewName>string</viewName>\n"
                         "<query></query>\n"
                         "<viewFields></viewFields>\n"
                         "<rowLimit></rowLimit>\n"
                         "<queryOptions></queryOptions>\n"
                         "<webID></webID>\n"
                         "</GetListItems>\n"
                         "</soap:Body> \n"
                         "</soap:Envelope>"];

我无法找出问题出在哪里,请帮助我..

3 个答案:

答案 0 :(得分:0)

“Guid应包含32位数字,包含4个短划线(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)。”通常表示listName节点中的值存在问题。这将获取您要查询的列表的显示名称或GUID(不带括号)。

您粘贴的是您现在发送的实际请求吗?会导致爆炸。

答案 1 :(得分:0)

listName元素应该是列表的GUID '{XXXXXXXXXXXX-XXXXXXXX-XXXXXXXXXXXX}' 一定要包括单引号。 希望这有帮助

答案 2 :(得分:0)

就我而言,我们的SharePoint实例有两个子站点。我没有通过URL查询正确的网站。我可以通过“错误”网站上的列表GUID进行查询,但是当我更新我的URL以指向正确的子网站时,它发现列表没有问题。

相关问题