ADF 连接 SOM VS2008 新建一个应用如下: 添加引用如下: 的内容 using System; using ; using ; using ; using ; using ; using ; using ; using ; using ; using ; using ; using ; // 注意: 如果更改此处的类名“ Service ”,也必须更新 文件中对“ Service ”的引用。 public class Service : IService { public ArrayList GetProvinceNames(string country) { string username = "ArcGISSOM"; string password = "111"; string domain = "ohn-THINK"; string hostname = "localhost"; ArrayList results = new ArrayList(); IServerContext serverContext = null; try { using (Releaser = Releaser()) { // Create the user identity. userIdentity = new (username, password, domain); AGSServerConnection agsConnnection = new AGSServerConnection(hostname, userIdentity); (); IServerObjectManager som = ; (som); serverContext = ("World", "MapServer"); IMapServer ms = (IMapServer); IMapServerObjects mapObjs = ms as IMapServerObjects; IMap map = (); ILayer layer = (0); // cities 图层 IFe
ADF连接SOM 来自淘豆网www.taodocs.com转载请标明出处.