I am developing an application for iPad that need data from a ODATA service. The service provide a list of activities and each activities have details.
Firs I obtain the list of all activities between two dates (date_from and date_to). This list have an “id”, “description”, “date_from” and “date_to”.
Code:
WindowsCredential *cred = [[[WindowsCredential alloc] initWithUserName:@"user" password:@"password"]autorelease];
PROXY001 *proxy = [[PROXY001 alloc] initWithUri:@"http://ip:8000/odata/PROXY001/" credential:cred];
DataServiceQuery *query =[proxy v1collection];
[query filter:@"owner eq 'OWNER' and date_from eq '20120101' and date_to eq '20121231'"];
QueryOperationResponse *response = [query execute];
NSMutableArray *activities = [[NSMutableArray alloc] init];
activities =[[response getResult] retain];
for (int i=0; i<activities.count; i++) {
v1collection *c = [activities objectAtIndex:i];
//etc...
}
But I need to get more details for each activity. To carry out this I have this uri:
http://ip:8000/odata/PROXY001/v1collection(binary'0050569C007D1ED1A8E615C3E1D843E1')
binary’0050569C007D1ED1A8E615C3E1D843E1′ is an “id” of one activity.
The problem is that I don’t know how do that with ObjectiveC.
Sorry for my english.
Thanks!!
I found the solution.