Page tree
Skip to end of metadata
Go to start of metadata

What is P4TestClient ?

P4TestClient is Java based stand alone RMI-P4 Client. You can use it to test creation of new initial context to engine.

How to run it

To setup this tool follow this steps:

  1. download from here and extract localy
  2. set properly class paths in Start_P4TestClient.bat (By default it expects NetWeaver installed in D:\usr\sap\LKG)
    • CLIENTLIB_DIR - Set the directory where you have stored your client jar sap.com~tc~je~clientlib~impl.jar
    • LOGGINGLIB_DIR - Set the directory where you have stored sap.com~tc~logging~java~impl.jar
    • EXCEPTIONLIB_DIR - Set the directory where you have stored sap.com~tc~exception~impl.jar
    • IAIK_DIR - If you are going to use p4 over ssl then type here the directory where you have stored:
      • iaik_jce.jar
      • iaik_ssl.jar
      • iaik_jsse.jar (for 7.10 and 7.11)
        If you don't use p4 over ssl then you can leave this setting empty (or pointing to default values, which will be ignored if resources not found)
  3. set P4TestClient.properties according to your test needs (see the section Settings)

Now you are ready to run the test by running Start_P4TestClient.bat. To exit the test you can press enter, otherwise the connection is still alive and you can observe healthcheck calls or INFORM messages.

Settings

After you successfully runs the program you usualy will use P4TestClient.properties file to setup different tests before run. This properties are directly passed as argument to the constructor of InitialContext. So you can look for documentation on help.sap.com for example: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/5bc0417951cf17e10000000a155106/frameset.htm

Here is an example of this properties file:

# implementation class name (do not chang it)
java.naming.factory.initial=com.sap.engine.services.jndi.InitialContextFactoryImpl

# host and port of the server to which this client will try to connect
# May use protocol P4://<host>:<P4_Port>, P4S://<host>:<P4SEC_Port>, P4NI://<SAPRouterString>, etc.
java.naming.provider.url=localhost:50004

# manage transport layer
# Possible values: None, ssl
#TransportLayerQueue=None

# to force opening connection even on localhost scenario
force_remote=true

# username
java.naming.security.principal=administrator

# password
java.naming.security.credentials=password

# in case of HTTP proxy use this to specify proxy host and proxy port.
#HTTP_Host=proxy
#HTTP_Port=8080

Don't forget that if you would like to setup p4 over SSL connection, you need additional jars in your classpath, which shall be set in Start_P4TestClient.bat script.

  • No labels

1 Comment

  1. Dear Ina,

     

    Thanks for your efforts in creating this testtool. Seems to work fine. But now I can get the initial context I am looking to get some other data out of the Java stack over P4/RMI. For example the UME parameter settings. Do you know if there is a list of possible callable methods/classes/functions or do you have saome examples of calling other functions than just the initial context?

     

    Best regards,

     

    Joris