on 01-16-2015 8:03 AM
Hi,
we do this steps to get a native iOS application functioning through the SAP Mobility platform version 3.0 SP05 and retrieving data from OData services.
But we do not understand the register process completely.
If we install the app and do the register process and retrieve the data everything is ok. A user with the ApplicationConnectionID is registered in in SMP. But if we start the app again (without a new installation) we do not register the user again an set the connection id we get in the registration process:
[self.clientConn setApplicationConnectionID:[selfreadInPlistMitKey:@"appConnectionID"]];
we set the encryptionKey in the manager and initialize the Cache once for the application launch.
[EncryptionKeyManager setEncryptionKey:key withError:nil];
But if we want to retrieve the data we get a Request Failed.
2015-01-15 18:13:31.885 AuthTest[12663:5b07] Firing requests from DB...
2015-01-15 18:13:31.886 AuthTest[12663:4c07] UrlString: http://smpServerAdress:8080
2015-01-15 18:13:31.889 AuthTest[12663:4c07] Connectivity changed...
2015-01-15 18:13:31.889 AuthTest[12663:4c07] Detected network...
2015-01-15 18:13:31.889 AuthTest[12663:4c07] Start queue...
2015-01-15 18:13:31.900 AuthTest[12663:4c07] UrlString: http://smpServerAdress:8080
2015-01-15 18:13:31.906 AuthTest[12663:907] Request Failed
What do we wrong? Where is the different between the request with registration an without.
Thanks,
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please share your code? The OData should URL when making the call after the registration is successful, it should look something like this:
http://<SMP-HOST-NAME>:8080/<application-ID>
You need to pass the X-SMP-APPCID with the application connection ID value.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We looked at your file and you are using the old way of the SDK. Please follow the steps in this blog. These are up-to-date and you will find it very useful.
http://scn.sap.com/docs/DOC-58677#iOS
Than you
Please check this one out and let me know if that helps:
Thank you
Hi Ali,
thank you but this was not realy what we need. But we can now register without to use the MAFLogonScren but when we whant to open the Online Store we get this error: "OpenStore failed with network error: 401 unauthorized" Do you know what we cvan do against this error or what the reason of this error is?
Here is the code snipped what we use:
MAFLogonUIViewManager *logonUIViewManager = [[MAFLogonUIViewManager alloc] init];
NSObject<MAFLogonNGPublicAPI> *logonManager= logonUIViewManager.logonManager;
HttpConversationManager* httpConvManager = [[HttpConversationManager alloc] init];
[[logonManager logonConfigurator] configureManager:httpConvManager];
MAFLogonCore *lc = self.appDelegate.lc;
MAFLogonContext *context;
if ([lc unlockSecureStore:@"abcd1234" error:&error]) {
context = [lc getContext:&error];
}
MAFLogonRegistrationContext *regContext = context.registrationContext;
SODataOnlineStore *onlineStore = [[SODataOnlineStore alloc]
initWithURL:[NSURL URLWithString:regContext.applicationEndpointURL]
httpConversationManager:httpConvManager];
[onlineStore setOnlineStoreDelegate:self];
[onlineStore openStoreWithError:&error];
I am not sure if you saw this document to do the registration without MAF.
http://scn.sap.com/docs/DOC-60196
thx
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.