SAPUI5: SAP NetWeaver User Interface Services -



SAPUI5: SAP NetWeaver User Interface Services -

good morning,

i'm using eclipe , tomcat develop , test sapui5 mobile application speaks sap odata service. after development fase application installed on sap server.

i'm trying utilize user interface services (sap.ui2) access user information.

my problem seems api not prepared called/used application not deploy on sap server. calls see beingness made relative calls , because of resources not found.

heres total sample:

<!doctype html> <html> <head> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv='content-type' content='text/html;charset=utf-8'/> <script src="<my-sap-server>/sap/public/bc/ui2/services/sap/ui2/srvc/error.js"></script> <script src="<my-sap-server>/sap/public/bc/ui2/services/sap/ui2/srvc/utils.js"></script> <script src="<my-sap-server>/sap/public/bc/ui2/shell-api/sap/ui2/shell/startup.js"></script> <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-libs="sap.m" data-sap-ui-theme="sap_bluecrystal"> </script> <script> var user = sap.ui2.shell.getuser(); user.load({ // depthatroot: 1, // nodeid: " ", // depthatnode: 1 }, function() { //set user info in json model alert(user.getfullname()); }, function(serrormessage) { /* failure handler: e.g. display load error */ alert(serrormessage); } ); </script> </head> <body class="sapuibody" role="application"> <div id="content"></div> </body> </html>

and error:

failed load resource: server responded status of 404 (not found) http://localhost:8080/sap/bc/ui2/start_up?depth=0 2014-10-07 10:30:10 error 404 in response url /sap/bc/ui2/start_up?depth=0 - sap.ui2.srvc

as shown, api assumes ui2 deployed on local server , not on remote sap server loaded libraries.

i've search sap.ui2 api , didn't found way alter behaviour.

without have 2 alternatives:

1 - start using sap server testing - not ideal me because development , testing take longer

2 - manually invoke url http:///sap/bc/ui2/start_up?depth=0 standard sapui5 jsonmodel - not desirable because if sap teams decides alter application can become broken.

any thoughts on matter?

thanks in advance.

what need mock service http://localhost:8080/sap/bc/ui2/start_up in tomcat.

the service homecoming dummy json object following:

class="lang-js prettyprint-override">{ "client": "200", "email": "dummy@gmail.com", "firstname": "dummy", "lastname": "test", "fullname": "dummy test", "id": "dummy", "language": "en" }

sap sapui5 netweaver

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -