cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in HCPMS SAPUI5 Hybrid App

former_member9607
Active Participant
0 Kudos

Hello Folks,

I am working on Hybrid application in webide,

SAPUI5 + HCPMS + On Prim ODATA

I was successfully able to build and deploy the app on my smart phone.

The problem is:

If i use logon manager plugin, I get below error:

Since the SAPID is the IDP, tried login with HCP user first. Later tried with bakcend user just to try the luck.

If i do not use logon manager plugin, I get below error:

Service returns 200 status but still throws an error on screen.

{
"requestUri": "https://mobile-user.dispatcher.us2.hana.ondemand.com:443/com.xx.order/$metadata?sap-documentation=he..."

"statusCode": 200,
"statusText": "OK",
"headers": [],
"body": "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"
http://www.wapforum.org/DTD/xhtml-mobile10.dtd\
"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no\"><meta http-equiv=\"pragma\" content=\"no-cache\" /></head><body style=\"background-color:#FFFFFF\" onload=\"var url=window.location.hash;if(url&&0!==url.length){var anchorCookie='oucrsmivhejzvmgudizazapwg_anchor=&quot;'+encodeURIComponent(url)+'&quot;';document.cookie=anchorCookie}document.forms[0].submit()\"><p><script language=\"javascript\">document.write(\"Please wait ...\");</script></p><noscript><p>Note: Your browser does not support JavaScript or it is turned off. Press the button to proceed.</p></noscript><form method=\"post\" action=\"https://accounts.sap.com/saml2/idp/sso/accounts.sap.com\"><input type=\"hidden\" name=\"SAMLRequest\" value=\"PEF1dGhuUmVxdW*************************Encrypted string******************************************</body></html>"
}

The configurations are as given below:

Development & Operations Cockpit Configurations

Security Configurations

Device Configuration in WEBIDE Project


Hybrid Application Tool kit: 1.18.2

SAPSMP SDK Version: 3.12.0 + Applied Patch 3.12.4

Can someone please help what is missing here?

I have gone through help documents and various blogs on HCPMS issues. But didn't find much about it.

Since I am not using a trial instance here, Would like to know what is the missing part as far as the configurations are done.

Thanks in advance.

Krishnakant



Accepted Solutions (1)

Accepted Solutions (1)

nageshcaparthy
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishnakant,

I see you are using the URL with https:xxxxx.dispatcher.xxxx.

It is not necessary for registration. Can you remove it and try.

Regards,

Nagesh

former_member9607
Active Participant
0 Kudos

Hi Nagesh,

Thanks for the reply.

Actually I tried with that.. After posting this question.

It worked. I was able to register the user, but still getting the other error.

Thanks,

Krishnakant

nageshcaparthy
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can you share the screen shot of the error? If this issue is closed. please mark it as answered.

Regards,

Nagesh

former_member9607
Active Participant
0 Kudos

Hi Nagesh,

The error is already there in the question i posted.

Note: Your browser does not support JavaScript or it is turned off. Press the button to proceed

Rg,

Krishnakant




nageshcaparthy
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Can you try to do a registration with the Postman client with the following URL format:

https://mobile-xxxx.us2.hana.ondemand.com:443/odata/applications/latest/appid/Connections

Since you are using Basic it should work good.

If can refer to this URL Point 5. 5. Testing Registration and Read operation


for registration.

Regards,

Nagesh

former_member9607
Active Participant
0 Kudos

Hi Nagesh,

I followed the steps to register user given in point 5.

I get below error.

Interesting part is: After I executed above url in postman, The Registration and Users tile was showing 1 user. (Before it I manually deleted all registered user)

When i click on Registration and Users tile, I see nothing in it. It gives "Unknown Error".

Btw we have not done any of the configuration stated in your blog.

We are using Default Identity Provider. Is it mandatory to use HCP SCIM  authentication?

Regards,

Krishnakant

nageshcaparthy
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Krishnakant,

SCIM is only used for LDAP authentication. In your case it is not required.

Step number 5 talks about the common registration process, hence I asked to check if that works. "Internal / Unknown Error" is something which is bothering, any configurations missing? You post says, it worked fine... if it has worked, you should be able to register using Postman client as well.

Regards,

Nagesh

former_member9607
Active Participant
0 Kudos

Hi Nagesh,

My configurations are already mentioned in question.

The one which I missed is dispatcher, which was also corrected.

When I remove the "dispatcher" from HCP host configuration in webide project settings> device configurations:

If the odata end point is configured to:

HANA CLOUD PLATFORM MOBILE SERVICE

getting 401 Unauthorized

HANA CLOUD PLATFORM DESTINATION

getting 200 OK

+

Note: Your browser does not support JavaScript or it is turned off. Press the button to proceed

Note: I am using S user to login.

Destination has Basic authentication and backend username password configured.

Backend Configuration in HCPMS has same username password configured as destination has.

Any ides what could be wrong here?

Regards,

KK

nageshcaparthy
Product and Topic Expert
Product and Topic Expert
0 Kudos

HI KK,

In a general process, we follow Principal Propagation if you are using S-User ID and also do external ID Mapping on the GW system with S-User to GW user. This also needs some configurations on Cloud Connector. You may refer to standard HCP guide for it.

Unfortunately, I have not seen any blog related to it.

Regards,

Nagesh

Answers (0)