解决方案 »

  1.   

    一般来说ARCGIS 开发有三种方式1:AE(arc engine) 开发  2:AO(arc object)开发 3:as (arcgis server)SOE是针对 AS开发时 当提供的服务满足不了特殊需求时而提供给用户的一个服务拓展功能。服务端通过实现IServerObjectExtension接口来实现服务的拓展由于GIS开发对展现效果要求越来越高,因此ESRI公司提供了一种B/S结构下的展现效果很棒的框架AS + REST +FLEX  开发  
      

  2.   

    当进行SOE开发时,需要实现另外一个接口 IRESTRequestHandler它提供了HTTP请求的一个功能FLEX通过HTTP请求-----SOE通过IRESTRequestHandler 接收HTTP请求 ----返回给FLEX建议 在组织请求参数时通过JSON组织参数,然后传递给SOE端SOE返回 也以JSON数据格式进行返回
      

  3.   

    下面讲下
      IServerObjectExtension 接口 需实现的方法  public void init(IServerObjectHelper soh) throws IOException,
    AutomationException
      主要是用于服务初始化时对当前服务所在地图(MAP)的获取  
    this.soHelper = soh;
    this.serverLog = ServerUtilities.getServerLogger();
    serverLog.addMessage(1, 1, "<==========init==========>");
    MapServer mapServer = (MapServer) soh.getServerObject();
    map = (Map) mapServer.getMap(mapServer.getMapName(0));
    int count = map.getLayerCount();
      
      

  4.   

    IRESTRequestHandler 需要实现的方法
    public String getSchema() throws IOException, AutomationException
    获得服务操作的详细描述信息 包括 操作名称  参数名称  返回类型
    public byte[] handleRESTRequest(String capabilities, String resourceName,
    String operationName, String operationInput, String outputFormat,
    String requestProperties, String[] responseProperties)
    throws IOException, AutomationException
    这是实现REST HTTP请求的主函数 在里面实现你的业务逻辑 以及返回数据
      

  5.   

    代码编写完成后,讲你的项目导出为JAR 包,然后分发到 
    AS 服务器上,就可以了