on 12-25-2014 10:07 AM
Hi Experts,
I'm a beginner in SAP UI 5 application development , I tried to consume a ODATA service from SAP Netweaver Gateway demo system (https://sapes1.sapdevcenter.com:443/sap/opu/odata/iwfnd/CATALOGSERVICE/).
My Connectivity.js file looks as below
I'm getting the below error while running the application .
GET http://localhost:8080/CatalogAPP/proxy/http/sapes1.sapdevcenter.com/sap/opu/odata/iwfnd/CATALOGSERVI... 500 (Internal Server Error)
Kindly provide some inputs to solve this issue.
Regards
Saravana
Hello Saravana ,
Need to do proxy setting , please follow the below steps :
1. Goto WebContent folder than to WEB-INF , please open the file web.xml (in Eclipse)
2. In the above file , change the proxy setting.
<!-- ============================================================== -->
<!-- UI5 proxy servlet -->
<!-- ============================================================== -->
<servlet>
<servlet-name>SimpleProxyServlet</servlet-name>
<servlet-class>com.sap.ui5.proxy.SimpleProxyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SimpleProxyServlet</servlet-name>
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>com.sap.ui5.proxy.REMOTE_LOCATION</param-name>
<param-value>http://sapes1.sapdevcentre.com:443</param-value>
</context-param>
3. In your connectivity.js get the url by using below code :
function getUrl(sUrl) {
if (sUrl == "")
return sUrl;
if (window.location.hostname == "localhost"
|| window.location.hostname == "put your computer name") {
return "proxy" + sUrl;
} else {
return sUrl;
}
}
var sURI = getUrl( '/sap/opu/odata/iwfnd/CATALOGSERVICE');
Kindly follow the above the steps and let me know of you still get any issue .
Thanks
Romit Raina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Run the same URL in gateway system and check whether the service metadata is being executed successfully there or not. There might be some error in OData service or in system connections.
Regards,
Aashika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.