Engine Java 如何连接Server服务器以进行地图服务的管理?

Engine Java 如何连接Server服务器以进行地图服务的管理?
已邀请:

朱新颖

赞同来自:

【解决办法】:
Engine Java中进行了测试,连接server的代码如下是可以的: 


private IServerObjectAdmin ConnectAGS(String host, String username, String password) 

IServerObjectAdmin m_ServerObjectAdmin = null; 
try 

IPropertySet propertySet = new PropertySet(); 
propertySet.setProperty(url, host); 
propertySet.setProperty(ConnectionMode, esriAGSConnectionMode.esriAGSConnectionModeAdmin); 
propertySet.setProperty(ServerType, esriAGSServerType.esriAGSServerTypeDiscovery); 
propertySet.setProperty(user, username); 
propertySet.setProperty(password, password); 
propertySet.setProperty(ALLOWINSECURETOKENURL, true); 
IAGSServerConnectionName3Proxy connectName = new IAGSServerConnectionName3Proxy(new AGSServerConnectionName()); 
connectName.setConnectionProperties(propertySet); 
INameProxy name = new INameProxy(connectName); 
IAGSServerConnectionAdmin agsAdmin =(IAGSServerConnectionAdmin)name.open(); 

m_ServerObjectAdmin = agsAdmin.getServerObjectAdmin(); 



catch (Exception exc) 

return null; 

return m_ServerObjectAdmin; 



调用代码: 
ConnectAGS(http://localhost:6080/arcgis/admin, arcgis, arcgis); 

要回复问题请先登录注册