Skip to Content

Unable to add any new SEAM service in WebIDE full-stack for MDK SEAM application.

Hello Experts,

we tried consuming the Northwind Odata Service in our application but faced CORS isssue.

We noticed there is new option "New SEAM Service"(instead of just 'Service') to create/consume odata service. With that we are getting the CORS issue as highlighted below screenshots.

We are unable to add even mobile sample services too. we noticed we can't add any new SEAM service to consume in MDK application.

Adding Mobile service connectivity config here,

backend URL in API.

Kindly suggest here,

Thanks in advance,

Jana

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Best Answer
    Nov 10, 2017 at 01:56 PM
    Janarthanan Elangovan
    we tried consuming the Northwind Odata Service in our application but faced CORS isssue.

    In Mobile services cockpit > Settings > Security > Cross Domain Access

    Add below in "Origin" (assuming you are using trial account)

    https://*.dispatcher.hanatrial.ondemand.com

    We noticed there is new option "New SEAM Service"(instead of just 'Service') to create/consume odata service.

    seems new options available now for adding service, pages, Actions for project using "App Modeler Mobile Application" template.

    Adding Mobile service connectivity config here,  

    For Northwind Service connectivity in Mobile service,

    SSO should be No Authentication (its a public OData service, doesnt require any auth)

    In Web IDE, for adding a service,

    change security profile in Mobile service to NONE,

    In service creation page,

    provide all details:

    Name:testService

    Service URL: https://hcpmsxx....xxx.ondemand.com/northwindtest

    Application ID: com.sap.sampleapp

    Destination Name: northwindtest

    After successful, you must change security profile to OAuth (e.g.)

    hope this helps.

    Regards,

    JK

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 13, 2017 at 01:36 AM

    With the v2 editor the process to add the service is slightly different.

    The v2 Editor now uses a SAP Cloud Platform Destination to access the service metadata. So before selecting New SEAM Service in the editor make sure you have a destination created that looks like the following.

    The URL in this case is the Mobile Services Server URL from under the API tab of the mobile application.

    Once you have the destination created, launch or reload WebIDE and then select New SEAM Serivce.

    The wizard should display and automatically show the destination in the Service URL.

    This of course assumes you have already added Northwind as a destination in mobile services and added it under Connectivity for your Application ID used in the Wizard. When you click Next the metadata should be displayed for the Northwind service. Clicking Finish will add the service and create the Objects in the Editor.

    --Bill

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 13, 2017 at 07:53 AM

    Hello Jitendra Kansal Bill Froelich

    thanks for your response, after adding origin to mobile service-> cross domain access. It is working fine and able to add new SEAM service :)

    Cheers,

    Jana

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 16, 2017 at 02:32 PM

    Hello Jitendra Kansal Bill Froelich ,

    Now we are unable to consume OData service from SEAM/MDK application,getting "Access denied to resource /Admin/Sessions/jaxrs/version". but with the same OData service we were able to get the data for consuming of other applications such as ui5/hybrid applications with same cloud connector/back-end destination configuration. Please find below screenshot for your reference.

    Kindly suggest here..

    Thanks,

    Jana

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 27, 2017 at 01:26 PM

    Hello Jitendra Kansal thanks for the reply,

    We have followed the above steps and we are getting metadata in mobile service, still we are unable to initialize OData service in our SEAM application. Please find below screenshots for your reference.(for now we are trying to consume available sample mobile service which is provided by SAP).

    Screenshot - 1. Configuration of sample mobile service OData

    Screenshot -2 :Destination configuration - metadata in mobile service.

    From the below screenshot we can say, we are able to get metadata loaded in mobile service.

    When we checked in log -> we get to know it throws same error " Retrieve metadata failed because the OData server returned 403 code. Please find below screenshots for your reference.

    1.Technical Log:

    2.Event log details:

    Kindly suggest here,let us know if more info required from our end.

    Thanks,

    Jana

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 29, 2017 at 01:42 PM

    Hello Jitendra Kansal Bill Froelich ,

    Yea adding more error log analysis to above issue.

    Step1. As mentioned by Jitendra Kansal in his reply, when we are hitting metadata from ->mobile service->app->connectivity ->destination service(here we are trying for sample mobile service )-> it is hitting metadata and showing entity set values.

    Please find below Technical/event log information for the result of step 1.
    Technical_log_Info:

    Event Log Info:

    If you notice the above event detail log -> it is hitting through Proxy component and loading metadata for step1.

    Step 2: We are unable to get Metadata load when we are trying to hit same service from MDK client. When we analysis in details log, it throws error saying " Retrieve metadata failed because the OData server returned HTTP code, 403.

    Technical log error for step 2:

    if you notice here it is not hitting through proxy component, and in service URL it dont have ESPM.svc part. please compare the above error log with step1 log info to get to know the difference.

    Event log error for step 2.

    We have checked everything from our end like destination configuration and followed the steps, but still we are not sure why we are not able to get data our sample mobile service. Kindly suggest here,it is now totally blocking our exploration with SEAM application development due to this OData service consumption issue.

    Thanks,

    Jana

    Add comment
    10|10000 characters needed characters exceeded