就是我从服务器上的moss平台上取下的数据,假如是一条新闻,怎么修改他,然后保存到服务器。
下面是我的修改代码- (NSString *)editUpdateListItems {NSString *scString = [NSString stringWithFormat:@"<Batch><Method ID='1' Cmd='Update'>" \
"<Field Name='ID'>%@</Field>"
"<Field Name='BaseName'>%@</Field></Method></Batch>"

[tableDictionary objectForKey:@"ows_ID"], 
[tableDictionary objectForKey:@"ows_Title"]
];
NSString *xmlString = [NSString stringWithFormat:@"<UpdateListItems xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\"> \
<listName>%@</listName> \
<updates>%@</updates> \
</UpdateListItems>",
[dataDicts objectForKey:@"InternalName"], scString
];
//InternalName
return xmlString;
}

解决方案 »

  1.   

    服务器得提供接受xml数据的接口,你按照接口要求上传文件就行了。
    你得找找服务器程序的负责人了。
      

  2.   

    服务器那边已经请求验证下来了。
    - (void)saveButtonClick1 :(id)sender {
        
        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
        
        
        NSString *xmlString = @"";
        
        switch ( navType ) {
            case ZYListItemNavTypeAdd1:
            {
                xmlString = [self addUpdateListItems];
                break; 
            }
            case ZYListItemNavTypeEdit1:
            {
                xmlString = [self editUpdateListItems];
                break; 
            }
            default:
                break;
        }
        ZYNetworkConnection *network = [[ZYNetworkConnection alloc] init];
        [network UpdateListItems:xmlString And:self];
        self.navigationItem.rightBarButtonItem = BARBUTTON(ZY_STRING_MENU, @selector(menuButtonClick:));
        navType = ZYListItemNavTypeNone1;
        [self.tableView reloadData];
        [network release];
    } [network UpdateListItems:xmlString And:self];
    是调用另一个- (void)UpdateListItems:(NSString *)xml And:(id)ctl{
        
        [self setConnection:@"lists.asmx" AndXml:xml AndSoap:@"UpdateListItems" And:ctl];
    }