Quantcast
Viewing all articles
Browse latest Browse all 9076

Unable to connect to Gateway Service from UI5 application

Dear Experts,

 

I tried to test an gateway service, which is working fine in chrome browser and i get the records. Almost all oData options like $filter, $format work.

 

But, when i tried to create an application and try to source that model through below code, it doesn't work.

 

Please let me know, where does it go wrong.

 

Code:

 

var oGwModel = new sap.ui.model.odata.oDataModel("http://<server>:8000/sap/opu/odata/sap/<service name>",false,'userid','password');

 

Error that i get in Chrome browser on F12:

 

  1. Uncaught TypeError: undefined is not a function sales_order.view.js:51
    1. sap.ui.jsview.createContentsales_order.view.js:51
    2. (anonymous function)JSView.js:6
    3. d.runWithPreprocessorssap-ui-core.js:134
    4. sap.ui.core.mvc.JSView.onControllerConnectedJSView.js:6
    5. sap.ui.core.mvc.View._initCompositeSupportView.js:6
    6. E.extend.constructorsap-ui-core.js:134
    7. M.extend.constructorsap-ui-core.js:134
    8. E.extend.constructorsap-ui-core.js:134
    9. M.createClass.fsap-ui-core.js:122
    10. M.createClass.fsap-ui-core.js:122
    11. sap.ui.lazyRequire.osap-ui-core.js:116
    12. sap.ui.viewView.js:6
    13. sap.ui.lazyRequire.q.each.o.(anonymous function)sap-ui-core.js:116
    14. (anonymous function)

 

My index.html file content:

 

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

 

   <script src="resources/sap-ui-core.js"
   id="sap-ui-bootstrap"
   data-sap-ui-libs="sap.m,sap.me,sap.ui.commons,sap.ui.ux3,sap.ui.table"
   data-sap-ui-theme="sap_bluecrystal">
   </script>
   <!-- only load the mobile lib "sap.m" and the "sap_mvi" theme -->

 

   <script>
   sap.ui.localResources("<Project name>");

 

 

Thanks and Regards.


Viewing all articles
Browse latest Browse all 9076

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>