Was this page helpful to you?
Do you have any additional feedback?
Using P4 Protocol Over a Secure Connection
You can set up a secure connection for P4 communication. You can lay the P4 messages over both SSL and HTTPS protocols.
- You configured your J2EE Engine to use SSL. For more information, see Configuring the Use of SSL on the J2EE Engine.
- You configured the port for secure connections that the P4 Provider Service running on the Java dispatcher listens to. Then, the client uses that port to open the secure connection in its request to the J2EE Engine.
For more information, see Managing the Underlying Transport Layers.
In your client code, obtain the InitialContext to connect to the remote object using the following properties:
1. Specify the port for the secure connection with the provider URL property.
2. Specify the underlying transport layer you want to use. You use the TransportLayerQueueproperty with value SSL for P4 over an SSL connection, or HTTPS for P4 over an HTTPS connection.
Below is an example of client code that obtains InitialContext using a specific transport layer. This transport layer (SSL or HTTPS) is specified by the transportType parameter provided in the command line when the following client code is executed:
public void init(String host, String port, String user, String pass, String transportType)
Properties p = new Properties();
p.put("java.naming.provider.url", host + ":" + port);
// The transportType parameter has value ssl or https.
// It is provided on the command line.
ctx = new InitialContext(p);
System.out.println("NamingClient.run1 ctx : " + ctx);
System.out.println(">> Exception : " + e.getMessage());
Make sure that the IAIK cryptographic libraries are included in the path of the client P4/SSL application. You can find these files in <central_instance>:/usr/sap/<sid> SYS/global/security/lib/tools.
The following content is not part of SAP product documentation. For more information, see the following disclaimer .