Skip to Content
0

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

Nov 10, 2017 at 06:42 AM

350

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

6 Answers

Best Answer
Jitendra Kansal
Nov 10, 2017 at 01:56 PM
0
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

Share
10 |10000 characters needed characters left characters exceeded
Bill Froelich
Nov 13, 2017 at 01:36 AM
1

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


servicedetail.png (34.5 kB)
url-location.png (38.2 kB)
addservice2.png (17.9 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Bill Froelich,

Just would like to know is there any restriction to use the properties "HandleRedirects" and "SkipSSOTokenGenerator" in destination for trail account? I'm not getting both properties for my trail account..is there anyway to use above two properties with trail account?

Regards,

Jana

0

You can just type in the values if they don't show in the drop down

0
Janarthanan Elangovan Nov 13, 2017 at 07:53 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Janarthanan Elangovan Nov 16, 2017 at 02:32 PM
0

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


Show 4 Share
10 |10000 characters needed characters left characters exceeded

Where is this error originating? What were you trying to do when the error appeared?

0

Hello Bill,

We are getting this error while adding new SEAM service from WebIDE - full stack.

Please find below screenshot for your reference.

In confirmation page , we are getting below error which we have highlighted earlier,

Kindly let us know if more info required. Please suggest solution for above issue.

Thanks,

Jana

0

Bill Froelich Jitendra Kansal any suggestions team?

Best Regards,

Jana

0
Janarthanan Elangovan
While adding new SEAM service, make sure you are pointing "Service URL" to a destination of SCP Mobile Service.

Also, in Mobile service app configuration, Connectivity> check OData Application Connection Test (icon before Ping) if you are able to get backend metadata, entities details via Mobile service.

Regards,JK
1
Janarthanan Elangovan Nov 27, 2017 at 01:26 PM
0

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


odata-config0.png (12.5 kB)
odata-config1.png (24.4 kB)
odata-metadata.png (33.2 kB)
odataerror-log.png (94.5 kB)
event-log.png (49.4 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Janarthanan Elangovan

I couldn't get where you got stuck

Were you not able to add "new SEAM service" in webide ? (or do you already have collection details in "Objects" folder)

Or you weren't able to initialize offline odata from client?

did you already check this video series https://www.youtube.com/watch?v=OrfPWWiZ2sc&list=PLkzo92owKnVzN85sWfSdmwSOqlOAFE9DO

can you point out step (or video part) where you encountered above error?

Regards,

JK

0

Hello Jitendra Kansal ,

Yes, we weren't able to initialize offline odata from client. I was referring those videos and exactly got stuck after creating list page, we are unable to get any data in list page. when we checked in logs - > we have saw the error which is having details in my previous answer/post. I can say in video series (creating list page)we didn't get any product list values in list page.. video link : https://www.youtube.com/watch?v=Yo9uLNN6YLQ∈dex=4&list=PLkzo92owKnVzN85sWfSdmwSOqlOAFE9DO

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

Thanks,

Jana

0

Looping Bill Froelich

0
Janarthanan Elangovan Nov 29, 2017 at 01:42 PM
0

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


techlog-info.png (35.5 kB)
event-log-info.png (112.9 kB)
techlog-error.png (116.8 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Looping Sue Berry ..

Any idea on above issue Sue.. Kindly let us know if you could find anything..

Thanks in advance.

Jana

0