storeDocument:forDocType:forUrlKey:withError: method

Stores the service document or the meta data document for further reuse since they are the base on which data parsing can be performed.

Syntax

- ( BOOL ) storeDocument : ( id ) document forDocType : ( DocType ) type forUrlKey : ( NSString * ) urlKey withError : ( NSError ** ) error

Parameters

Returns

Boolean to indicate the outcome of the operation.
 id<Caching> cacheLocal = [[Cache alloc] init];
 NSError* error = nil;
 if ([cacheLocal storeDocument:servDoc forDocType:ServiceDocumentType forUrlKey:urlKey withError:&error]) {
     NSLog("Store Document Error : %@", error);
     return;
 }