Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3510

Re: Reading oData service data into an array for manipulation

$
0
0

are you using eclipse or webide?

 

"/sap/opu/odata/sap/<Odata service name>" is a valid URL only if you run you SAPUI5 app on the same server as your OData service.


for local eclipse you have to configure proxy (in web.xml)


<servlet>

  <servlet-name>SimpleProxyServlet</servlet-name>

  <servlet-class>com.sap.ui5.proxy.SimpleProxyServlet</servlet-class>

 

 

  <init-param>

  <param-name>com.sap.ui5.proxy.REMOTE_LOCATION</param-name>

  <param-value>http://<YOUR_GATEWAY></param-value>

  </init-param>

 

 

</servlet>

 

 

<servlet-mapping>

  <servlet-name>SimpleProxyServlet</servlet-name>

  <url-pattern>/proxy/*</url-pattern>

</servlet-mapping>

 

new sap.ui.model.odata.ODataModel("proxy" + "/sap/opu/odata/sap/<Odata service name>");


and for webide you have to configure destination and and add a mapping in neo-app.json


{

  "path": "/sap/opu/odata",

  "target": {

   "type": "destination",

   "name": "XXX_GW",

   "entryPath": "/sap/opu/odata"
  },

  "description": "Target OData system"
},


Viewing all articles
Browse latest Browse all 3510

Trending Articles



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