com.supermap.web.ogc.wfs
public class WFSServiceBase
继承 WFSServiceBase Inheritance flash.events.EventDispatcher
子类 DescribeWFSFeatureType, GetWFSCapabilities, GetWFSFeature, WFSTransaction

WFS 服务基类.

该类是 WFS 服务请求的基类。WFS 服务根据所包含功能的不同可分为三种,目前 SuperMap iClient 8C for Flash 不仅支持最基本的 WFS 服务(Basic WFS),还支持事务操作,具体包括 GetCapabilities Operation(获取服务中的要素类及支持的操作)、DescribeFeatureType Operation(描述要素类的信息)、GetFeature Operation(获取要素)、Transaction Operation(事务操作:delete、update、insert)四个功能,相应的本产品提供 GetWFSCapabilities、GetWFSDescribeFeatureType、GetWFSFeature 、GetWFSTransaction 四个服务类(继承于 WFSServiceBase 类)来支持这四种功能。

另请参见

com.supermap.web.ogc.wfs.GetWFSCapabilities
com.supermap.web.ogc.wfs.DescribeWFSFeatureType
com.supermap.web.ogc.wfs.GetWFSFeature


公共属性
  属性 定义方
    url : String
WFS 服务地址(如:http://localhost:8090/iserver/services/data-world/wfs100)。
WFSServiceBase
    version : String
请求的服务版本号。目前 SuperMap iServer Java 6R 仅支持 WFS 1.0.0 版本。
WFSServiceBase
公共方法
  方法 定义方
   
实例化 WFSServiceBase 对象。
WFSServiceBase
   
processAsync(responder:IResponder = null):void
发送服务请求...
WFSServiceBase
受保护的方法
  方法 定义方
   
getFinalUrl():String
获取服务资源请求地址,不同的操作对应不同的资源地址。
WFSServiceBase
   
getResultHandler(event:ResultEvent, asyncToken:AsyncToken):void
服务请求成功后的回调函数。
WFSServiceBase
   
handleStringError(errorString:String, asyncToken:AsyncToken):void
服务请求失败后的回调函数。
WFSServiceBase
属性详细信息
url 属性
url:String

WFS 服务地址(如:http://localhost:8090/iserver/services/data-world/wfs100)。


Implementation
    public function get url():String
    public function set url(value:String):void
version 属性  
version:String

请求的服务版本号。目前 SuperMap iServer Java 6R 仅支持 WFS 1.0.0 版本。


Implementation
    public function get version():String
    public function set version(value:String):void
构造函数详细信息
WFSServiceBase () 构造函数
public function WFSServiceBase()

实例化 WFSServiceBase 对象。

方法详细描述
getFinalUrl () 方法
protected function getFinalUrl():String

获取服务资源请求地址,不同的操作对应不同的资源地址。

返回
String
getResultHandler () 方法  
protected function getResultHandler(event:ResultEvent, asyncToken:AsyncToken):void

服务请求成功后的回调函数。

参数

event:ResultEvent
 
asyncToken:AsyncToken

handleStringError () 方法  
protected function handleStringError(errorString:String, asyncToken:AsyncToken):void

服务请求失败后的回调函数。

参数

errorString:String
 
asyncToken:AsyncToken

processAsync () 方法  
public function processAsync(responder:IResponder = null):void

发送服务请求...

获取服务请求结果有两种方式,一种是通过监听 *.PROCESS_COMPLETE 事件;一种是使用 AsyncResponder 类,以 GetWFSCapabilities 为例,实现代码如下:
//1.通过监听 WFSCapabilitiesEvent.PROCESS_COMPLETE 事件获取结果:
……
var gc:GetWFSCapabilities = new GetWFSCapabilities(wfsURL);
gc.processAsync();
gc.addEventListener(WFSCapabilitiesEvent.PROCESS_COMPLETE, capabilitiesCompleteHandler);
……
//WFSCapabilitiesEvent.PROCESS_COMPLETE 事件侦听函数
private function capabilitiesCompleteHandler(event:WFSCapabilitiesEvent):void
{
//请求结果存储在 event.wfsCapabilitiesResult 中



//2.通过 AsyncResponder 类获取请求结果
……
var gc:GetWFSCapabilities = new GetWFSCapabilities("http://localhost:8090/iserver/services/data-world/wfs100");
gc.processAsync(new AsyncResponder(capabilitiesCompleteHandler, null, null));
……

参数

responder:IResponder (default = null)