Hallo Leute,
ich hoffe ich bin hier im richtigen Bereich. Wenn nicht bitte verschieben.
Also es geht um das folgende Problem:
Ich schreiben im Rahmen einer Vorlesung eine App, genauer ausgedrückt eine FH-App. Mit der App soll man die Möglichkeit haben sich Stundenpläne, Mensapläne etc. anzeigen zu lassen usw..
Leider ist die Unterstützung (im ObjC Bereich) sehr gering, ja fast sogar keine. Da wird man von einem zum anderen weitergeleitet.
Also jetzt aber zum Problem:
Ich versuche mit WSDL die Daten vom Server zu holen, was auch eigentlich klappt, nur ich weiß nicht was ich mit der Ausgabe genau anfangen soll. WSDL.. Klassen mit Sudzc erstellt. Beispielprojekt klappt wunderbar und bekomme ne ausgabe.
Alles anzeigen
logging aktiviert.
ich versuche seit tagen die Ausgabe irgendwie mit JSON zu parsen jedoch ohne erfolg.
Example.m
Alles anzeigen
ich hoffe ihr könnt mir hier weiterhelfen. bin echt verzweifelt.
ich hoffe ich bin hier im richtigen Bereich. Wenn nicht bitte verschieben.
Also es geht um das folgende Problem:
Ich schreiben im Rahmen einer Vorlesung eine App, genauer ausgedrückt eine FH-App. Mit der App soll man die Möglichkeit haben sich Stundenpläne, Mensapläne etc. anzeigen zu lassen usw..
Leider ist die Unterstützung (im ObjC Bereich) sehr gering, ja fast sogar keine. Da wird man von einem zum anderen weitergeleitet.
Also jetzt aber zum Problem:
Ich versuche mit WSDL die Daten vom Server zu holen, was auch eigentlich klappt, nur ich weiß nicht was ich mit der Ausgabe genau anfangen soll. WSDL.. Klassen mit Sudzc erstellt. Beispielprojekt klappt wunderbar und bekomme ne ausgabe.
Quellcode
- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo}
- http://ws.inf.fh-dortmund.de/TimeTableBeanService/TimeTableBean
- 2011-06-03 11:18:10.594 SudzCExamples[5661:207]
- 2011-06-03 11:18:10.779 SudzCExamples[5661:207] {"BRANCHES": [
- {
- "NAME": "Master Informatik (29.03.2011)",
- "ID": 0
- },
- {
- "NAME": "Master Medizinische Inf. (29.03.2011)",
- "ID": 1
- },
- {
- "NAME": "Master Wirtschaftsinformatik (08.03.2011)",
- "ID": 2
- },
- {
- "NAME": "Medizinische Inf. 2. Sem. (28.01.2011)",
- "ID": 3
- },
- {
- "NAME": "Medizinische Inf. 4. Sem. (24.01.2011)",
- "ID": 4
- },
- {
- "NAME": "Medizinische Inf. 6. Sem. (25.03.2011)",
- "ID": 5
- },
- {
- "NAME": "Praktische Inf. 2. Sem. (08.03.2011)",
- "ID": 6
- },
- {
- "NAME": "Praktische Inf. 4. Sem. (10.02.2011)",
- "ID": 7
- },
- {
- "NAME": "Praktische Inf. 6. Sem. (25.03.2011)",
- "ID": 8
- },
- {
- "NAME": "Softwaretechnik dual 2. Sem. (17.05.2011)",
- "ID": 9
- },
- {
- "NAME": "Technische Inf. 2. Sem. (08.03.2011)",
- "ID": 10
- },
- {
- "NAME": "Technische Inf. 4. Sem. (10.02.2011)",
- "ID": 11
- },
- {
- "NAME": "Technische Inf. 6. Sem. (25.03.2011)",
- "ID": 12
- },
- {
- "NAME": "Wirtschaftsinf. 2. Sem. (10.02.2011)",
- "ID": 13
- },
- {
- "NAME": "Wirtschaftsinf. 4. Sem. (28.01.2011)",
- "ID": 14
- },
- {
- "NAME": "Wirtschaftsinf. 6. Sem. (25.03.2011)",
- "ID": 15
- }
- ]}
- 2011-06-03 11:18:10.781 SudzCExamples[5661:207] getCurrentBranches returned the value: {
- return = "{\"BRANCHES\": [\n {\n \"NAME\": \"Master Informatik (29.03.2011)\",\n \"ID\": 0\n },\n {\n \"NAME\": \"Master Medizinische Inf. (29.03.2011)\",\n \"ID\": 1\n },\n {\n \"NAME\": \"Master Wirtschaftsinformatik (08.03.2011)\",\n \"ID\": 2\n },\n {\n \"NAME\": \"Medizinische Inf. 2. Sem. (28.01.2011)\",\n \"ID\": 3\n },\n {\n \"NAME\": \"Medizinische Inf. 4. Sem. (24.01.2011)\",\n \"ID\": 4\n },\n {\n \"NAME\": \"Medizinische Inf. 6. Sem. (25.03.2011)\",\n \"ID\": 5\n },\n {\n \"NAME\": \"Praktische Inf. 2. Sem. (08.03.2011)\",\n \"ID\": 6\n },\n {\n \"NAME\": \"Praktische Inf. 4. Sem. (10.02.2011)\",\n \"ID\": 7\n },\n {\n \"NAME\": \"Praktische Inf. 6. Sem. (25.03.2011)\",\n \"ID\": 8\n },\n {\n \"NAME\": \"Softwaretechnik dual 2. Sem. (17.05.2011)\",\n \"ID\": 9\n },\n {\n \"NAME\": \"Technische Inf. 2. Sem. (08.03.2011)\",\n \"ID\": 10\n },\n {\n \"NAME\": \"Technische Inf. 4. Sem. (10.02.2011)\",\n \"ID\": 11\n },\n {\n \"NAME\": \"Technische Inf. 6. Sem. (25.03.2011)\",\n \"ID\": 12\n },\n {\n \"NAME\": \"Wirtschaftsinf. 2. Sem. (10.02.2011)\",\n \"ID\": 13\n },\n {\n \"NAME\": \"Wirtschaftsinf. 4. Sem. (28.01.2011)\",\n \"ID\": 14\n },\n {\n \"NAME\": \"Wirtschaftsinf. 6. Sem. (25.03.2011)\",\n \"ID\": 15\n }\n]}";
- }
logging aktiviert.
ich versuche seit tagen die Ausgabe irgendwie mit JSON zu parsen jedoch ohne erfolg.
Example.m
Quellcode
- - (void)run {
- // Create the service
- wsTimeTableBeanService* service = [wsTimeTableBeanService service];
- service.logging = YES;
- // Returns id.
- //[service getActivitiesByDay:self action:@selector(getActivitiesByDayHandler:)];
- // Returns id.
- //[service getActivitiesForWeek:self action:@selector(getActivitiesForWeekHandler:)];
- // Returns id.
- [service getCurrentBranches:self action:@selector(getCurrentBranchesHandler:)];
- // Returns id.
- //[service getStaffByAbbreviation:self action:@selector(getStaffByAbbreviationHandler:)];
- // Returns id.
- //[service getStaffList:self action:@selector(getStaffListHandler:)];
- // Returns id.
- //[service initialize:self action:@selector(initializeHandler:)];
- }
- // Handle the response from getActivitiesByDay.
- - (void) getActivitiesByDayHandler: (id) value {
- // Handle errors
- if([value isKindOfClass:[NSError class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Handle faults
- if([value isKindOfClass:[SoapFault class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Do something with the id result
- id result = (id)value;
- NSLog(@"getActivitiesByDay returned the value: %@", result);
- }
- // Handle the response from getActivitiesForWeek.
- - (void) getActivitiesForWeekHandler: (id) value {
- // Handle errors
- if([value isKindOfClass:[NSError class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Handle faults
- if([value isKindOfClass:[SoapFault class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Do something with the id result
- id result = (id)value;
- NSLog(@"getActivitiesForWeek returned the value: %@", result);
- }
- // Handle the response from getCurrentBranches.
- - (void) getCurrentBranchesHandler: (id) value {
- // Handle errors
- if([value isKindOfClass:[NSError class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Handle faults
- if([value isKindOfClass:[SoapFault class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Do something with the id result
- id result = (id)value;
- NSLog(@"getCurrentBranches returned the value: %@", result);
- }
- // Handle the response from getStaffByAbbreviation.
- - (void) getStaffByAbbreviationHandler: (id) value {
- // Handle errors
- if([value isKindOfClass:[NSError class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Handle faults
- if([value isKindOfClass:[SoapFault class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Do something with the id result
- id result = (id)value;
- NSLog(@"getStaffByAbbreviation returned the value: %@", result);
- }
- // Handle the response from getStaffList.
- - (void) getStaffListHandler: (id) value {
- // Handle errors
- if([value isKindOfClass:[NSError class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Handle faults
- if([value isKindOfClass:[SoapFault class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Do something with the id result
- id result = (id)value;
- NSLog(@"getStaffList returned the value: %@", result);
- }
- // Handle the response from initialize.
- - (void) initializeHandler: (id) value {
- // Handle errors
- if([value isKindOfClass:[NSError class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Handle faults
- if([value isKindOfClass:[SoapFault class]]) {
- NSLog(@"%@", value);
- return;
- }
- // Do something with the id result
- id result = (id)value;
- NSLog(@"initialize returned the value: %@", result);
- }
- @end
ich hoffe ihr könnt mir hier weiterhelfen. bin echt verzweifelt.