Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Problem using POST on SimpleProxyServlet

$
0
0

Hi experts,

 

I encountered today an issue trying to POST a request through the SimpleProxyServlet from sap.ui5.

 

The answer of the post is actually an HTML file instead of the actual response from my sap system. I get this in return:

 

<html><head><style type="text/css">.middle  { vertical-align:middle; }</style></head><body onload="document.forms[0].submit()"><form method="post" action="URL TO MY SERVER"><input type="hidden" name="service" value="lkjhgfdx"><input type="hidden" name="Tcode" value="qwertyuio"></form><table border="0" width="100%" height="100%"><tr><td align="center" class="middle">Your request is being processed</td></tr></table></body></html>

 

where URL TO MY SERVER links to an oData service.

 

I currently have defined my SimpleProxyServlet in the web.xml file as follow:

 

<servlet>

  <servlet-name>proxy</servlet-name>

  <servlet-class>com.sap.ui5.proxy.SimpleProxyServlet</servlet-class>

</servlet>

<servlet-mapping>

  <servlet-name>proxy</servlet-name>

  <url-pattern>/proxy/*</url-pattern>

</servlet-mapping>

 

<context-param>

      <param-name>com.sap.ui5.proxy.REMOTE_LOCATION</param-name>

      <param-value>HOSTNAME:PORT</param-value>

</context-param>

 

where hostname and port are the actual values to my sap system.

 

I'm just wondering why it doesn't work and if something is wrong in my config as all the GET are going through correctly...

 

Thanks a lot for your help


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>