Java API openCAMConnectionWithNamespace
Posted: Mon Dec 19, 2011 8:50 pm
I am attempting change a java TI process execute "wrapper" from mode 1 authentication to mode 4 (CAM Security).
IBM has provided a technote covering how to authenticate with CAM using C++ https://www-304.ibm.com/support/docview ... wg21418355
The Java prototype for the connection function is as follows:
It seems like the Java function utilizes a parameter, java.lang.String connID, that isn't used in the C++ approach. I don't see any TM1 java methods that return a connID nor does it seem like I'd have a connID before a connection is established.
Below is the authentication part of the modified wrapper. My guess is that it is failing due to an undefined connID.
Any thoughts on what the connID is supposed to be?
Thanks,
-- John
IBM has provided a technote covering how to authenticate with CAM using C++ https://www-304.ibm.com/support/docview ... wg21418355
Code: Select all
C++ Example Connection with a CAMNamespace in Cognos 8 using TM1SystemServerConnectWithCAMNamespace :
TM1V voServerName = TM1ValStringW( hPool, (TM1_UTF16_T *)pszServerName, 0 );
TM1V voPasswd = TM1ValStringEncryptW( hPool, (TM1_UTF16_T*)pszPassword, 0 );
TM1V vArray[3];
vArray[0] = TM1ValStringW( hPool, (TM1_UTF16_T*)szCAMNamespace, 0 );
vArray[1] = TM1ValStringW( hPool, (TM1_UTF16_T*)admin_login_name, 0 );
vArray[2] = voPasswd;
TM1V vCAMArgArr = TM1ValArray(hPool, vArray, 3);
TM1V vTmpServer = TM1SystemServerConnectWithCAMNamespace(hPool, voServerName, vCAMArgArr);
Code: Select all
openCAMConnectionWithNamespace(java.lang.String serverName, java.lang.String connID, TM1Val vArgArr)
Below is the authentication part of the modified wrapper. My guess is that it is failing due to an undefined connID.
Code: Select all
String TM1AdminHost = "tm1adminhost";
TM1AdminPort = 5494;
String TM1DataServer = "tm1server";
String TM1ConnID = "blah"; // ummm?
TM1Bean bean = new TM1Bean();
bean.setAdminHost(TM1AdminHost);
bean.setAdminPort(TM1AdminPort);
TM1Val pCAMArray = TM1Val.makeArrayVal(3);
pCAMArray.addToArray(new TM1Val("namespace"));
pCAMArray.addToArray(new TM1Val("user"));
pCAMArray.addToArray(new TM1Val("password"));
TM1Server tm1_server = bean.openCAMConnectionWithNamespace(TM1DataServer, TM1ConnID, pCAMArray);
Thanks,
-- John