diff --git a/SoObjects/Appointments/GNUmakefile b/SoObjects/Appointments/GNUmakefile index 10fd04297..5d0a40152 100644 --- a/SoObjects/Appointments/GNUmakefile +++ b/SoObjects/Appointments/GNUmakefile @@ -50,7 +50,7 @@ Appointments_OBJC_FILES = \ Appointments_RESOURCE_FILES += \ product.plist \ - \ + MSExchangeFreeBusySOAPResponseMap.plist \ MSExchangeFreeBusySOAPRequest.wo Appointments_LANGUAGES = Arabic BrazilianPortuguese Catalan Czech Danish Dutch English Finnish French German Hungarian Icelandic Italian NorwegianBokmal NorwegianNynorsk Polish Russian Slovak SpanishSpain SpanishArgentina Swedish Ukrainian Welsh diff --git a/SoObjects/Appointments/MSExchangeFreeBusy.m b/SoObjects/Appointments/MSExchangeFreeBusy.m index 0aa0f8b19..c11ca9f31 100644 --- a/SoObjects/Appointments/MSExchangeFreeBusy.m +++ b/SoObjects/Appointments/MSExchangeFreeBusy.m @@ -20,6 +20,7 @@ * Boston, MA 02111-1307, USA. */ +#import #import #import @@ -97,8 +98,10 @@ size_t curl_body_function_freebusy(void *ptr, size_t size, size_t nmemb, void *i MSExchangeFreeBusySOAPRequest *soapRequest; MSExchangeFreeBusyResponse *freeBusyResponse; NSString *rawRequest, *url, *body, *hostname, *httpauth, *authname, *password; + NSString *mapFile; NSArray *infos = nil; NSDictionary *root; + NSBundle *bundle; CURL *curl; struct curl_slist *headerlist=NULL; @@ -161,7 +164,13 @@ size_t curl_body_function_freebusy(void *ptr, size_t size, size_t nmemb, void *i } if (sax == nil && parser != nil) { - sax = [[SaxObjectDecoder alloc] initWithMappingAtPath:@"./MSExchangeFreeBusySOAPResponseMap.plist"]; + bundle = [NSBundle bundleForClass: [self class]]; + mapFile = [bundle pathForResource: @"MSExchangeFreeBusySOAPResponseMap" ofType: @"plist"]; + if (![mapFile length]) + { + [self errorWithFormat: @"mapFile not found (MSExchangeFreeBusySOAPResponseMap.plist)"]; + } + sax = [[SaxObjectDecoder alloc] initWithMappingAtPath: mapFile]; [parser setContentHandler:sax]; //[parser setErrorHandler:sax]; }