Hello guys,
i have a little service I created via Transaction SICF. This service does nothing else than return a json string via HTTP.
How can I call this service from a SAPUI5 application? (The SAPUI5 application is not deployed on the ABAP Server, instead it is running locally on my client)
var oModel = new.sap.ui.model.json.JSONModel();
oModel.loadData("http://xxx.server.com:8000/myServicePath"); is not working. Any idea?
Thanks
Goluef
Request clarification before answering.
In Transaction SICF, right click on your service node -> test Service.
Here you can test your service directly in your browser.
Are you setting username and password for your request?
var mParameters = {
username: "user",
password: "password"
}
var oModel = new.sap.ui.model.json.JSONModel();
oModel.loadData("http://xxx.server.com:8000/myServicePath",mParameters);
If the application runs locally and the service is hosted on your ABAP-System, it could also appear in a problem.
Something like "Allow control Allow Origin" should appear in your browsers console. Google for that problem, i'm using a chrome plugin to access Gateway services, when the application is running locally.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean the service is running on a localhost server, e.g. Tomcat or Apache?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.