Show TOC Start of Content Area

Procedure documentation Mapping Ports  Locate the document in its SAP Library structure

Use

You can consider mapping ports in one of the following situations when the client-server communication is conducted through a proxy environment:

      To change the communication scheme from HTTP to HTTPS. In this case, you must map a port on the Java dispatcher to the proxy server’s host and port.

      To provide support for HTTP 1.0 client requests. Such requests are not required to have the Host header. So, in cases when the client request is HTTP 1.0 compatible and does not contain the Host header, it must be redirected to a certain host. That host name is later returned to the client as a value of the Location header of the response message.

Syntax

A single port mapping has the following format:

<ICM-port>=(Host:<virtual-hostname>,Port:<virtual-port number>,Scheme:<virtual-scheme>,Override:<true/false>)

      <ICM-port> is the real physical port that Internet Communication Manager (ICM) has opened to process HTTP requests.

      <virtual-hostname>, <virtual-port number> and <virtual-scheme>are the hostname, port, and scheme to appear in the servlet request. They are used by the application when generating redirect locations and HTML links.

       The possible values of the Scheme attribute are http or https.

       By default, the Override: attribute has a value of false. That is, if the client request contains information about the client’s host and port, the HTTP Provider Service does not override its values with the values of the corresponding attributes of the ProxyMappings property. However, if no host and port information is present in the request, it takes the values of the Host: and Port: attributes of the property and sets them to the response. If, on the other hand, you set the Override: attribute to true, the values of the Host: and Port: attributes are always set to the response even if the request contained host and port information.

Caution

Map only one host to a given proxy port! Multiple hosts per port mappings may not work as expected in cases of HTTP 1.0 clients.

Multiple port mappings are comma-separated lists of single port mappings.

Procedure

You can define port mapping with the ProxyMappings property of the HTTP Provider Service running on the AS Java. Use the NetWeaver Administrator tool to perform this configuration task:

...

       1.      To modify the properties of the HTTP Provider Service using SAP NetWeaver Administrator, use the Java System Properties function. For more information, see Java System Properties.

       2.      In the Services tab, select HTTP Provider Service.

On the Extended Details tab page, a list of all service properties is displayed.

       3.      Define the port mapping as a value of the ProxyMappings property. The value represents a comma-separated list of multiple port mappings.

       4.      Choose Save Changes.

Example

Defining a Single Mapping

You have your engine installed on host localhost and port 50000 (ICM host and port). You want to map it to your proxy server with host name www.sap.com and port 80 (virtual hostname and port). To do this, enter the following as a value of the ProxyMappings property:

50000=(Host:www.sap.com,Port:80,Scheme:http,Override:false)

Defining Multiple Mappings

In addition to the above mapping, you may want to open port 50001 on host localhost on your engine (ICM host and port). You can map it to port 443 on your proxy server with host name www.sap.com for HTTPS requests (virtual hostname and port). To do this, enter the following as a value of the ProxyMappings property:

50000=(Host:www.sap.com,Port:80,Scheme:http,Override:true),50001=(Host:www.sap.com,Port:443,Scheme:https,Override:true)

End of Content Area