cancel
Showing results for 
Search instead for 
Did you mean: 

SMP3 Native OData iOS : ODataServiceProvisioningFailed ?

Former Member
0 Kudos

Hi Experts ,

I'm using Xcode : Version 6.2, SMP3 SP06 SDK and SMP3 SP06 Runtime Server.

I followed this() article and implemented the sample OData application, When I run the app to simulator I'm  getting the issue like

this, and in the server log it's showing Error :

2015 03 25 15:22:49#+0530#ERROR#com.sap.gateway.core.ip.provider.data.CamelDataProvider##anonymous#http-bio-8083-exec-7###[Gateway][TECHNICAL][ODataServiceProvisioningFailed]:Failed to Provision Odata service. com.sap.gateway.core.api.exception.TechnicalException: DestinationConfigurationException- exception occurred while getting the destination |

Please help me to resolve the issue.

Thanks & Regards,

Vamsi K .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for your support.

VK.

Answers (3)

Answers (3)

Ali_Chalhoub
Advisor
Advisor
0 Kudos

Just few things:

1. When calling the https SMP URL and using port 8081 from POSTMAN or Rest Client, just be aware if you are using the self-signed certificate, you need to import the SMP cert into the Trusted Certificate Authorities in the browser, otherwise, you won't be able to register.

2. When specifiying the X-SMP-APPCID header value, you need to provide a value ot it or remove it and SMP will populate it automatically for you.

Thank you

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

First do the full test in REST client then you can test the same in simulator,

1. Just to make sure, have you created a destination of type JPA under DESTINATION tab in gateway cockpit and added it to ESPM service?

Also, are you able to execute https://ipadd:8083/gateway/odata/sap/EspmService;v=1/SalesOrderItems in the browser?

2. Once you are done with the registration through REST client, are you able to retrieve record in REST client for same entityset (lets say SalesOrderItems) ?

URL: https://smpserverip:8081/appid

Method: GET

headers:

     Authorization: smp user credentials

     x-smp-appcid:

     content-type: application/xml

    

Regards,JK

Former Member
0 Kudos

Jitendra Kansal

To create destination  type JPA, I'm not using Persistence Layer to persist or fetch the objects in my backend,

So to configure the service under JPA what are the steps I need to follow to access the service .

Regards,

VK.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Vamsi,

If i am not wrong, you are using predefined odata service ESPM. right? To make it work, you have to define Persistence Unit com.sap.espm.model under destination tab. Once you are done, you have to add this destination to the existing odata service EspmService.

Regards,

JK

Former Member
0 Kudos

Hi Jitendra,

The REST client responses ,

1.  https://xxxxxxxxxx:8083/gateway/odata/sap/EspmService;v=1/SalesOrderItems  Getting response.

2.  https://192.168.1.8:8081/com.yqlabs.poc.smp3


  • Status Code: 403 Forbidden
  • Content-Language: en
  • Content-Length: 1009
  • Content-Type: text/html;charset=utf-8
  • Date: Wed, 01 Apr 2015 18:14:18 GMT
  • Server

HTTP Status 403 - Application connection id is not provided


type Status report

message Application connection id is not provided

description Access to the specified resource has been forbidden.



Regards,

VK

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Vamsi,

Can you share the screenshot of GET request? I am able to receive 200 ok response and also for each entityset.

Make sure you are passing proper values in the header sections.

Note: I suggest you to hide ip address/server related info.

Regards,

JK

Former Member
0 Kudos

Hi

I skipped the X-SMP-APPID step in the REST client, Now I'm getting the response

But while running the application getting previous DBHelper calss not loaded issue.

Thanks in advance,

VK.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

I am not sure what might have missed in code section. Maybe can give more inputs.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Vamsi,

Please check below once:

1. Are you able to ping app id (in admin cockpit) for the given odata service?

2. Do you see a response when you run http://smpserver:port in iOS simulator?

3. Are you able to register the same app id through rest client? and getting backend info? (you may refer )

Let me call for more inputs.

Regards,

JK

Former Member
0 Kudos

Hi Jitendra kansal,

1. Are you able to ping app id (in admin cockpit) for the given odata service?

2. Do you see a response when you run http://smpserver:port in iOS simulator?

And in the Last step It's not allowing  to POST method

Can you guide me to solve this ..

Thanks in advance,

VK.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Since you are trying with an HTTPS call, can you check if you are able to run https://ipaddress:8081 url in the PC browser? Do you see same response what you got in simulator?

I also suggest you to clear cache and cookies for both rest client and browser and then try. Sometime advanced REST client behaves strange, you may also check in POSTMAN (Postman - REST Client - Chrome Web Store).

Give a try with http and 8080 port while registration instead of https and 8081.

Hope this helps.

Regards,

JK

Message was edited by: Jitendra Kansal

Former Member
0 Kudos

Jitendra Kansal

Yes, After pinging the https://ipaddress:8081 in the Postman -REST Client SSL connection was enabled and Registrations occurred , Now in the simulator I facing 403 issue

And I need clarification regarding end point url in Admin Cockpit and gateway Management Cockpit.

Regards,

VK.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Below points to be checked again:

1.  Just noticed that you have white-listed Odata url (exposed via integration gateway).

http://ip:8080/gateway/odata/sap/EspmService;v=1

From SMP3 SP04 runtime onward, all odata services URL listen on HTTPS and Admin port (8083/8084). Cross check it once by clicking on below,

for me its like https://smpserver:8083/gateway/odata/sap/ESpmService;v=1

2.  As you are adding IGW odata url while creating app id in Admin cockpit, have you checked INTERNAL option under BACKEND tab for the same app id?

3. When exactly you are getting 403 error? During registration or accessing backend data?

Regards,

JK

Former Member
0 Kudos

Jitendra Kansal

1. https://192.168.1.8:8083/gateway/odata/sap/EspmService;v=1  Getting response like

2. Yes I'm giving above url in BACKEND connection tab and checking the INTERNAL option for same app id.

3. 403 issues was occurred when i clicked twice Registration button, After adding


else

        [self.downloadDataButton setEnabled:YES]; condition to startRegistration() method  Data Download Exceptions raised.

4. When the app launched on simulator for the First time hit to Register user connection is enabling in the Admin Cockpit. It means I'm hitting the service, Now I modified the code in Register user click event like

- (IBAction)startRegistrationid)sender {

  

    NSError *error = [self.controller initialiseSMP];

    if (error) {

       [self displayError:[error debugDescription]];

    }else

        [self.downloadDataButton setEnabled:YES];

}

So enabling the downloadDataButton, And after clicking this button new issue raised

And Once again I hit the Register user it's showing new exception

LOG:

2015-03-31 20:18:39.105 SMP3-101[3363:60b] displayError --> Error Domain=DBHelper class not loaded Code=0 "The operation couldn’t be completed. (DBHelper class not loaded error 0.)"

2015-03-31 20:18:51.808 SMP3-101[3363:60b] Request Failed

2015-03-31 20:18:51.809 SMP3-101[3363:60b] displayError --> Unable to retrieve data

Regards,

VK.

Former Member
0 Kudos

Hi Jitendra,

In the Gateway Management Cockpit under Troubleshooting tab it's showing

Regards,

VK.

Former Member
0 Kudos

Hi Jitendra kansal,

I'm able to connect to the server, But unable to download the data from the backend service,  As Vamsi Konanki mentioned I strucked up here can you please help me out.

Thanks & Regards,

Lokesh G.