Руководство Разработчика для Cisco Cisco 3350 Mobility Services Engine

Скачать
Страница из 224
                   
C
ISCO 
MSE
 
API
 
S
PECI FICATI ON 
G
UIDE 
 
C
ONTEXT 
A
W ARE 
S
ERVICE OF 
MSE,
 
R
EL EASE 
7.4
.
                                   
P
A G E  
218
  O F  
227  
 
}
 
Run:  
Java InstallCert MSEIP 
Where MSEIP-IP Address of the MSE Engine. It will return all certificates in the server.  
Enter 1 0r 2, index of the certificate to be used. 
Jssecacerts file will be created in the current root folder were this program is exeuted. 
Then use this file in the SetProperty of the sample program. 
Sample client Program which uses the generated java files to connect to the server. 
package
 com.cisco.mse; 
import
 java.rmi.RemoteException; 
import
 com.cisco.mse.location.GetServerInfoDocument; 
import
 com.cisco.mse.location.LocationServiceStub; 
import
 com.cisco.mse.location.ResponseDocument; 
import
 com.cisco.mse.types.AesBusinessSession; 
import
 com.cisco.mse.types.AesLogin; 
import
 com.cisco.mse.types.AesLogout; 
import
 com.cisco.mse.types.LoginDocument; 
import
 com.cisco.mse.types.LoginMethodArgs; 
import
 com.cisco.mse.types.LogoutDocument; 
import
 com.cisco.mse.types.LogoutMethodArgs; 
import
 com.cisco.mse.types.SessionDocument; 
 
public
 
class
 TestSample { 
 
public
 
static
 
void
 properties() { 
 
 
System.setProperty(
"javax.net.ssl.trustStore"
 
 
 
 
"D:\\namespace\\src\\jssecacerts"
);