cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace server url to proxy url in OData Response

Former Member
0 Kudos

Hello experts,

i'm facing a problem with SAP gateway in combination with a proxy . We use a proxy to call SAP gateway from the Internet.

So we make a http call to the proxy like: http://proxyserver:8000/sap/opu/odata/sap/testservice.

But in the OData response in every href tag of the xml the url shows the internal server url like

atom:link rel="self" href="http://internalserver:8000/sap/opu/odata/sap/testservice/$metadata"/>

Especially in a senario when using a proxy we don't want to give the internet (external) user information about the inner infrastructure.

Is there a posibillity to change the urls in the OData document to the url of the proxy?

Many thanks

Kai

Accepted Solutions (1)

Accepted Solutions (1)

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Xiang,

Have you tried this configuration option using table HTTPURLLOC yet?

URL Generation - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library

Best Regards,

Andre

Former Member
0 Kudos

Hello Andre,

the scenario we have searched for was: http://help.sap.com/saphelp_nw74/helpdata/de/48/68cfc677ef4e71e10000000a421937/content.htm?frameset=...

Szenario 3: Kommunikation direkt und über reversen Proxy

After we configure the table httpurlloc according to the example our problem was solved. For special needs we use the programm interface as described in the help pages.

Once again many thanks.

Kai

Former Member
0 Kudos

Hello Andre,

in the past we always configure the apache reverse proxy to replace the OData urls of each entity.

With the help page you mentioned, we now know about the possibility to use the http-header-field host for generating correct OData urls. For that only the reverse proxy has to preserve the host header field.

Please, can you say me why the best-practise is to configure the apache reverse proxy to replace the OData urls, instead of preserving the host header field only?

Thanks a lot

Kai

Answers (2)

Answers (2)

santhu_gowdaz
Active Contributor
0 Kudos

if your url looks like       http://XXXXXX

then replace like           proxy/http/XXXXXXXXXXXXXX

Former Member
0 Kudos

Hello Santhosh,

the best practise way is to use an apache reverse proxy and configure the substitution of the entity urls in OData in the http body by an output filter.

See

I think you mean the simple proxy servlet for local development? That was not our problem.

Best wishes

Kai

Former Member
0 Kudos

Hi Andre,

thank you very much for this hint. It could solve a great infrastructure problem that exists in a current project.

I'll report about the results, soon.

Many thanks

Kai