Skip to Content
0
Former Member
Jul 23, 2014 at 02:51 PM

OData Service to Netweaver Gateway via local Proxy in Eclipse does not work.

377 Views

Dear Colleagues,

I have setup a local Proxy in Eclipse alongwith a local Tomcat and have done all the quirks and setup as mentioned in the Setup pages of Fiori. For e.g. https://wiki.wdf.sap.corp/wiki//display/UICEI/Proxy+Servlet+Configuration and other ones.

But unfortunately even after lot of tries i am not able to get the access to the ODATA service via the Proxy.

Analysis so far:

-Proxy works well when using http requests, but fails when using https requests. This is still theory as most of the Gateway servers only allow https.

- Automatic switch from http to https works only in browser. Proxy cannot handle this.

- If we need to test the Fiori apps locally we always need a workaround as the URLs to the OData services are only relative URLs.

- If I provide an absolute URL in the App Configuration then everything works fine, i.e. access via Proxy works fine.

It could be that i still have missed out on something in the Forward.properties file, but I have tried everything that i could find on the Wiki.

It is hard to believe that even after so much of development in Fiori no one came across this issue. So i am looking forward to any kind of help here.

Here are the results(http request response) while accessing Odata via the Proxy.

a) http://localhost:8080/sap/opu/odata/sap/CRM_BUPA_ODATA/$metadata

  1. Remote Address:::1:8080
  2. Request URL:http://localhost:8080/sap/opu/odata/sap/CRM_BUPA_ODATA/$metadata
  3. Request Method:GET
  4. Status Code:400 Bad Request
  5. Request Headersview source
    1. Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    2. Accept-Encoding:gzip,deflate,sdch
    3. Accept-Language:en-US,en;q=0.8
    4. Connection:keep-alive
    5. Host:localhost:8080
    6. User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
  6. Response Headersview source
    1. Connection:close
    2. Connection:close
    3. Content-Length:0
    4. Date:Wed, 23 Jul 2014 14:35:42 GMT
    5. Server:Apache-Coyote/1.1
    6. X-Forwarded-To:https://ldciuxd.wdf.sap.corp:44329/sap/opu/odata/sap/CRM_BUPA_ODATA/$metadata
    7. X-Forwarded-Via-Rule:gateway

b) https://localhost:8443/sap/opu/odata/sap/CRM_BUPA_ODATA/$metadata

  1. Remote Address:::1:8443
  2. Request URL:https://localhost:8443/sap/opu/odata/sap/CRM_BUPA_ODATA/$metadata
  3. Request Method:GET
  4. Status Code:400 Bad Request
  5. Request Headersview source
    1. Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    2. Accept-Encoding:gzip,deflate,sdch
    3. Accept-Language:en-US,en;q=0.8
    4. Cache-Control:max-age=0
    5. Connection:keep-alive
    6. Host:localhost:8443
    7. User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
  6. Response Headersview source
    1. Connection:close
    2. Connection:close
    3. Content-Length:0
    4. Date:Wed, 23 Jul 2014 14:33:22 GMT
    5. Server:Apache-Coyote/1.1
    6. X-Forwarded-To:https://ldciuxd.wdf.sap.corp:44329/sap/opu/odata/sap/CRM_BUPA_ODATA/$metadata
    7. X-Forwarded-Via-Rule:gateway