cancel
Showing results for 
Search instead for 
Did you mean: 

Relay server and Offline Store

Former Member
0 Kudos

Hi Experts,

I am creating an iOS application which uses OfflineStore to store the data offline. Relay server is used to connect to the SMP server.  I am able to onboard the user successfully. But while trying to open the store, stuck with error "Communication with the server failed with error code 404".


The server version used is SP09 and the SDK version is SP10 PL10.


Following is the code for assigning the StoreOptions values:


- (SODataOfflineStoreOptions *)offlinestoreOptions

{

    NSError* localError = nil;

   

    SODataOfflineStoreOptions *storeOptions = [[SODataOfflineStoreOptions alloc] init];

    self.data = [self.logonManager registrationDataWithError:&localError];

   

    NSLog(@"%@", self.data.applicationEndpointURL);

    NSLog(@"%@", self.data.applicationEndpointURL);

    storeOptions.enableHttps = self.data.isHttps;

    storeOptions.host = self.data.serverHost;

    storeOptions.port = self.data.serverPort;

    storeOptions.serviceRoot = [NSString stringWithFormat:@"/%@", self.data.applicationId];

   storeOptions.urlSuffix = [NSString stringWithFormat:@"%@/%@",self.data.resourcePath, self.data.farmId];

    [storeOptions addDefiningRequestWithName:@"Authorizations" url:           [NSString stringWithFormat:@"%@/Authorizations", self.data.applicationEndpointURL] retrieveStreams:FALSE];

    [storeOptions addDefiningRequestWithName:@"Visits" url:[NSString stringWithFormat:@"%@/Visits", self.data.applicationEndpointURL] retrieveStreams:FALSE];

   

    storeOptions.conversationManager = self.conversationManager;

    storeOptions.enableRepeatableRequests = NO;

    storeOptions.storeName = @"OfflineStore";

    return storeOptions;

}

Can anyone please help to find out where I am going wrong?

Regards,

Dhani

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member190800
Contributor
0 Kudos

Can you share the plaintext (ok if anonymized) of the SODataOfflineStoreOptions values?

kenichi_unnai
Advisor
Advisor
0 Kudos

Please check whether the urlSuffix parameter is set correctly.

Examples:

For IIS Relay server, it should be of the form: /rs/client/rs_client.dll/<farmid>

For Apache relay server, it should be of the form: /cli/iarelayserver/<farmid>