on 03-26-2016 9:52 PM
Hi All,
I have an odata webservice which is tested successfully on the browser which returns the metadata. However when i use the url to create an Odata model in my ui5 application in eclipse and run it locally from eclipse , it gives me 500 internal server error in console.
One thing to note is that I am using VPN to access the odata url of the gateway server and I am prefixing my URL with proxy
var oMdl_Article = new sap.ui.model.odata.ODataModel("proxy/http/<ip>:<port>/sap/opu/odata/sap/zarticle_viewer_srv/");
When I view the webservice URL in the browser seperately it works fine after asking me username and password
PS: When I upload as BSP to gateway server and remove the proxy/ keyword , the ODATA url returns successfull 200 code. Hence the issue is been faced only while executing this app locally from eclipse for testing,
Message was edited by: Amber .
Hi Amber,
Did you resolve this issue, if so please can you share how. I am in the exact situation, accessing the gateway server through VPN. The service call is working via direct call in browser but in eclipse its throwing 500 error.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amber,
Since, you're able to access the metadata of the service through the browser, it seems VPN is not the issue here.
The best way to troubleshoot the issue is to use a browser based REST client tool like Postman (for Chrome) for issuing a POST call to the service. The client shall ask you for an authorization to access the front end server where your oDATA service is hosted. You may pass the Username and Password in the Service URL (preferably a separate service user ID for security).
Once you're able to make a POST call, you shall be sure that the service is working fine and accessible externally. After this, you may integrate it with your UI code.
Regards,
Shalabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shalabh,
Thanks for your reply. I dont have any POST entity method implemented in my webservice yet but I have tested with GET method .
1) When I execute the WEBSERVICE URL for GET entityset in browser directly , it shows me the xml output in browser successfully with correct data.
2) When I deploy my app from eclipse to sap abap repository (gateway) as bsp and execute from there , the app shows up in browser with SUCCESSFULL call to ODATA webservice
3) But When I try to test my app locally from eclipse (using localhost) ,I add the prefix "proxy" (as shown in screenshot above), the ODATA webservice , in this case the odata call shows the500 Server error as given in the screenshot above.
So basically scenario 3 is giving issues
Regards
Amber
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.