2009-12-15 53 views
1

我正在开发一个iphone应用程序,用于请求sharePoint的soap请求,例如GetListItems Web服务。但我得到不同类型的异常,我很新的iphone,也SOAP请求..用于iphone开发的GetListItems webservices的soap请求

错误是: - “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>"]; 

我找不到问题出在哪里请帮我..

回答

0

“Guid应该包含32个数字,并且有4个破折号(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)。”通常意味着listName节点中的值存在问题。这需要显示名称或您正在查询的列表的GUID(没有括号)。

是你粘贴了你现在发送的实际请求?会导致爆炸的原因。

+0

嗨 谢谢你的快速回复。是的,我把32位数的viewName ..但我发送空白listName。所以我需要为listname放32位数字?如果您有Iphone应用程序开发的示例应用程序请求,请发给我。 感谢和Regrads, KamalBhr – KamalBhr 2009-12-16 05:20:03

+0

你一定要指定列表名称... – 2009-12-18 16:14:04

0

listName元素应该是列表的GUID '{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}' 一定要包含单引号。 希望这可以帮助

0

在我的情况下,我们的SharePoint实例有两个子站点。我没有通过URL查询正确的网站。我可以通过“错误”网站上的列表GUID进行查询,但是当我更新我的URL以指向正确的子网站时,它找到了没有问题的列表。