on 05-27-2015 7:22 AM
Hello!
Trying to test a standard Fiori application in Eclipse using Tomcat 7.0.
I've use all available guides and googled it intensively, but it seems that SimpleProxyServlet doesn't work for me.
So my web.xml contains:
<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://mycompanyurl.ru:8000</param-value>
</context-param>
Component-preload.js:
---cut----
"hcm.emp.payslip.Configuration",
{
oServiceParams : {
serviceList : [ {
name : "SRA006_SRV",
masterCollection : "Payslips",
serviceUrl : "HCM_PS_MON/proxy/sap/opu/odata/sap/SRA006_SRV/",
isDefault : true,
mockedDataSource : "/hcm.emp.payslip/model/metadata.xml"
} ]
},
---cut----
I've tried various options like serviceUrl : "/proxy/sap/opu/odata/sap/SRA006_SRV/", serviceUrl : "proxy/sap/opu/odata/sap/SRA006_SRV/", but nothing helps.
Always get something like "GET http://localhost:8080/proxy/sap/opu/odata/sap/SRA006_SRV/$metadata 404 (Not Found)"
Where should I put my vision to solve that strange behavior?
Can you attach your web.xml here ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Make sure that SimpleProxyServlet is working by following this steps:
1) Open your web.xml and find application name.
2) Try to access your OData service via tomcat's proxy (please make sure tomcat is up and running) - replace "mySuperApp" to applciation name you find in step 1.
http://localhost:8080/mySuperApp/proxy/sap/opu/odata/sap/SRA006_SRV/$metadata
Let us know about results.
Regards,
Vladimir
Thanks! Just post some steps in case you would not share web.xml
Can you try to access your OData via tocmat's proxy ( I guess you are running your app on tomcat ? ) by openning following url in new browser tab
http://localhost:8080/HCM_PS_MON/proxy/sap/opu/odata/sap/SRA006_SRV/$metadata
When I access OData service in such way, everything is OK.
But when I'm using a sandbox launchpad (http://localhost:8080/HCM_PS_MON/test-resources/sap/ushell/shells/sandbox/fioriSandbox.html#HCM_PS_M..., got that error.
Sweet - it show you that SimpleProxyServlet works as a charm and your application code should be adjusted accordingly.
Can you try to change serviceUrl in your Component.js to
/HCM_PS_MON/proxy/sap/opu/odata/sap/SRA006_SRV
and then try again... in case of error please make a screenshot of Chrome's console.
Hi Vladimirs,
may be do you have some experience to bind seleral odata services in one fiori project?
Could you please look at this request: How to bind Multi Model / OData Services in Fio... | SCN
Thanks in advance.
Regards,
Dmitry
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.