T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
TPRPC client functions

Functions

 tpco_closeSrvSession
 This function closes a TPRPC session to a T4x server. More...
 
 tpco_connectTo
 This function opens a connection to a server. More...
 
 tpco_openSrvSession
 This function opens a TPRPC session to a T4x server. More...
 
 tpco_openSrvSession2
 This function opens a TPRPC session to a T4x server. This function supports SSL and HTTP tunneling. More...
 
 tpco_openSrvSession3
 This function opens a TPRPC session to a T4x server. This function supports SSL and HTTP tunneling and 2way ssl. More...
 
 tpco_sendSrvCMD
 This function sends a command to the T4x server and waits for the result. More...
 

Detailed Description

Function Documentation

◆ tpco_closeSrvSession()

tpco_closeSrvSession

◆ tpco_connectTo()

tpco_connectTo

This function opens a connection to a server.

Parameters
idStringid/name of the connection configuration to use
Returns
>0 handle ID, <0 error
1 set hd [tpco_connectTo BGS]
2 if {$hd >= 0} {
3  puts [tpco_sendSrvCMD $hd 10 {} ::T4STest::echo [list p1 p2 p3] 0 0]
5 }
6 
7  output:
8  0 {p1 p2 p3}

Referenced by T4X::SOAP::CLIENT::callSoapOperation(), ITK::connect2TcDB(), T4X::CONNECTION2EA::deleteConnectionInfo(), T4X::SOAP::CLIENT::deployShmemVariable(), T4X::SOAP::CLIENT::existsShmemVariable(), getBinLogFile(), T4X::SOA::getConnectionParameters(), ITK::setConnectionParameters(), storeBinLogFile(), and testLogPattern().

◆ tpco_openSrvSession()

tpco_openSrvSession

This function opens a TPRPC session to a T4x server.

Deprecated:
Please use tpco_connectTo.
Parameters
serverthe server ip or hostname
portthe port of the server
userusername (default=0)
passwdpassword (default=0)
Returns
>0 handle ID, <0 error
Remarks
tpco_openSrvSession is an old function, please use tpco_openSrvSession2. tpco_openSrvSession can only open connections over SOCKET and IPv4.
Example see tpco_sendSrvCMD

◆ tpco_openSrvSession2()

tpco_openSrvSession2

This function opens a TPRPC session to a T4x server. This function supports SSL and HTTP tunneling.

Deprecated:
Please use tpco_connectTo.
Parameters
serverthe server ip or hostname
portthe port of the server
userusername (default=0)
passwdpassword (default=0)
transport
  • SOCKET connect via plain socket (very fast) (default)
  • SSLSOCKET connect via ssl socket
  • HTTP connect via http tunnel
  • HTTPS connect via https tunnel
portocol
  • IP64 use dual ip-stack (default)
  • IP6 use IPv6 only
  • IP4 use IPv4 only
proxy(optional) If a http(s) connection is used, an http(s) proxy can be specified.
Remarks
example see tpco_sendSrvCMD
Returns
>0 handle ID, <0 error

◆ tpco_openSrvSession3()

tpco_openSrvSession3

This function opens a TPRPC session to a T4x server. This function supports SSL and HTTP tunneling and 2way ssl.

Deprecated:
Please use tpco_connectTo.
Parameters
-serverthe server ip or hostname
-portthe port of the server
-userusername (opional default=0)
-passwdpassword (opional default=0)
-transport(optional)
  • SOCKET connect via plain socket (very fast) (default)
  • SSLSOCKET connect via ssl socket
  • HTTP connect via http tunnel
  • HTTPS connect via https tunnel
-ipmode(optional)
  • IP64 use dual ip-stack (default)
  • IP6 use IPv6 only
  • IP4 use IPv4 only
-proxy(optional) If an http(s) connection is used, an http(s) proxy can be specified.
-ccert(optional) the client certificate.
-rcert(optional) the reverse certificate.
Returns
>0 handle ID, <0 error

◆ tpco_sendSrvCMD()

tpco_sendSrvCMD

This function sends a command to the T4x server and waits for the result.

Parameters
handlethe connection handle
touttimeout for the command (seconds)
procmdinternal use only
cmdthe server command
pargthe comannd arguments (tcl list)
priopriority of the command (0-255)
wthidchooses the server worker ID for the command (0= all worker)
Returns
Tcl List {returncode return-value}. A nonzero return code is a error.

example tprpc server-call (plain socket ipv6)

1 set hd [tpco_openSrvSession2 demo.example.com 11300 0 0 SOCKET IP6]
2 if {$hd >= 0} {
3  puts [tpco_sendSrvCMD $hd 10 {} ::T4STest::echo [list p1 p2 p3] 0 0]
5  }
6 
7  output:
8  0 {p1 p2 p3}

example tprpc server-call (https tunnel via proxy ipv64)

1 set hd [tpco_openSrvSession2 t4sdeb.dev.tplocal 11310 0 0 HTTPS IP64 193.29.43.39]
2 if {$hd >= 0} {
3  puts [tpco_sendSrvCMD $hd 10 {} ::T4STest::echo [list p1 p2 p3] 0 0]
5  }
6 
7  output:
8  0 {p1 p2 p3}