如何使用PHP调用ArcGIS Server的Soap接口

0
分享 2015-12-09
前一阵子,简单的学习了一下ArcGIS Server,在开发层次上ArcGIS Server支持两种协议,一个是老的Soap协议,也就是webservice,另外一种是REST协议,其中REST协议是从ArcGIS Server9.3开始支持的协议,也是ESRI今后只要支持的协议,但是老的Soap协议还继续支持。该章得内容主要介绍如何使用PHP来调用ArcGIS Server的WebService。
查看ArcGIS Server的SOAP SDK的帮助的时候,会发现所提供的示例代码只有c#,vb.net和java的,并没有PHP语言的示例,实际上并不是不支持PHP语言,从PHP toolkits include PHP-SOAP and NuSOAP上可以看出PHP是支持Soap协议的,只不过使用PHP并没有提供现成的工具可以将WSDL转换成本地化的类,而.NET SDK提供了Wsdl.exe工具,java提供了Apache Axis工具可以将WSDL中的类型转换成本地化类。
当使用PHP调用WebService的时候,当输入的参数是简单数据类型的时候是没有任何问题的,返回值类型是类得时候也没有任何的问题,但是当输入参数的值类型为某个类得时候,就无法调用了,这些类太多了,自己手写这些类几乎是不可能,因此找到一个类似于Wsdl.exe和Apache Axis的工具还是很有必要的,在网上终于搜到一个工具,名字为wsdl2php.php可以实现该功能,其代码如下所示:


// +------------------------------------------------------------------------+
// | wsdl2php |
// +------------------------------------------------------------------------+
// | Copyright (C) 2005 Knut Urdalen


|

// +------------------------------------------------------------------------+
// | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
// | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
// | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
// | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
// | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
// | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
// | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
// +------------------------------------------------------------------------+
// | This software is licensed under the LGPL license. For more information |
// | see http://wsdl2php.sf.net |
// +------------------------------------------------------------------------+

ini_set('soap.wsdl_cache_enabled', 0); // disable WSDL cache

//if( $_SERVER['argc'] != 2 ) {
// die("usage: wsdl2php


/n");

//}

$wsdl = "http://liuf:8399/arcgis/servic ... 3B%3B

print "Analyzing WSDL";

try {
$client = new SoapClient($wsdl);
} catch(SoapFault $e) {
die($e);
}
print ".";
$dom = DOMDocument::load($wsdl);
print ".";

// get documentation
$nodes = $dom->getElementsByTagName('documentation');
$doc = array('service' => '',
'operations' => array());
foreach($nodes as $node) {
if( $node->parentNode->localName == 'service' ) {
$doc['service'] = trim($node->parentNode->nodeValue);
} else if( $node->parentNode->localName == 'operation' ) {
$operation = $node->parentNode->getAttribute('name');
//$parameterOrder = $node->parentNode->getAttribute('parameterOrder');
$doc['operations'][$operation] = trim($node->nodeValue);
}
}
print ".";

// get targetNamespace
$targetNamespace = '';
$nodes = $dom->getElementsByTagName('definitions');
foreach($nodes as $node) {
$targetNamespace = $node->getAttribute('targetNamespace');
}
print ".";

// declare service
$service = array('class' => $dom->getElementsByTagNameNS('*', 'service')->item(0)->getAttribute('name'),
'wsdl' => $wsdl,
'doc' => $doc['service'],
'functions' => array());
print ".";

// PHP keywords - can not be used as constants, class names or function names!
$reserved_keywords = array('and', 'or', 'xor', 'as', 'break', 'case', 'cfunction', 'class', 'continue', 'declare', 'const', 'default', 'do', 'else', 'elseif', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'extends', 'for', 'foreach', 'function', 'global', 'if', 'new', 'old_function', 'static', 'switch', 'use', 'var', 'while', 'array', 'die', 'echo', 'empty', 'exit', 'include', 'include_once', 'isset', 'list', 'print', 'require', 'require_once', 'return', 'unset', '__file__', '__line__', '__function__', '__class__', 'abstract', 'private', 'public', 'protected', 'throw', 'try');

// ensure legal class name (I don't think using . and whitespaces is allowed in terms of the SOAP standard, should check this out and may throw and exception instead...)
$service['class'] = str_replace(' ', '_', $service['class']);
$service['class'] = str_replace('.', '_', $service['class']);
$service['class'] = str_replace('-', '_', $service['class']);

if(in_array(strtolower($service['class']), $reserved_keywords)) {
$service['class'] .= 'Service';
}

// verify that the name of the service is named as a defined class
if(class_exists($service['class'])) {
throw new Exception("Class '".$service['class']."' already exists");
}

/*if(function_exists($service['class'])) {
throw new Exception("Class '".$service['class']."' can't be used, a function with that name already exists");
}*/

// get operations
$operations = $client->__getFunctions();
foreach($operations as $operation) {

/*
This is broken, need to handle
GetAllByBGName_Response_t GetAllByBGName(string $Name)
list(int $pcode, string $city, string $area, string $adm_center) GetByBGName(string $Name)

finding the last '(' should be ok
*/
//list($call, $params) = explode('(', $operation); // broken

//if($call == 'list') { // a list is returned
//}

/*$call = array();
preg_match('/^(list/(.*/)) (.*)/((.*)/)$/', $operation, $call);
if(sizeof($call) == 3) { // found list()

} else {
preg_match('/^(.*) (.*)/((.*)/)$/', $operation, $call);
if(sizeof($call) == 3) {

}
}*/

$matches = array();
if(preg_match('/^(/w[/w/d_]*) (/w[/w/d_]*)/(([/w/$/d,_ ]*)/)$/', $operation, $matches)) {
$returns = $matches[1];
$call = $matches[2];
$params = $matches[3];
} else if(preg_match('/^(list/([/w/$/d,_ ]*/)) (/w[/w/d_]*)/(([/w/$/d,_ ]*)/)$/', $operation, $matches)) {
$returns = $matches[1];
$call = $matches[2];
$params = $matches[3];
} else { // invalid function call
throw new Exception('Invalid function call: '.$function);
}

$params = explode(', ', $params);

$paramsArr = array();
foreach($params as $param) {
$paramsArr[] = explode(' ', $param);
}
// $call = explode(' ', $call);
$function = array('name' => $call,
'method' => $call,
'return' => $returns,
'doc' => isset($doc['operations'][$call])?$doc['operations'][$call]:'',
'params' => $paramsArr);

// ensure legal function name
if(in_array(strtolower($function['method']), $reserved_keywords)) {
$function['name'] = '_'.$function['method'];
}

// ensure that the method we are adding has not the same name as the constructor
if(strtolower($service['class']) == strtolower($function['method'])) {
$function['name'] = '_'.$function['method'];
}

// ensure that there's no method that already exists with this name
// this is most likely a Soap vs HttpGet vs HttpPost problem in WSDL
// I assume for now that Soap is the one listed first and just skip the rest
// this should be improved by actually verifying that it's a Soap operation that's in the WSDL file
// QUICK FIX: just skip function if it already exists
$add = true;
foreach($service['functions'] as $func) {
if($func['name'] == $function['name']) {
$add = false;
}
}
if($add) {
$service['functions'][] = $function;
}
print ".";
}

$types = $client->__getTypes();

$primitive_types = array('string', 'int', 'long', 'float', 'boolean', 'dateTime', 'double', 'short', 'UNKNOWN', 'base64Binary', 'decimal', 'ArrayOfInt', 'ArrayOfFloat', 'ArrayOfString', 'decimal', 'hexBinary'); // TODO: dateTime is special, maybe use PEAR::Date or similar
$service['types'] = array();
foreach($types as $type) {
$parts = explode("/n", $type);
$class = explode(" ", $parts[0]);
$class = $class[1];

if( substr($class, -2, 2) == '[]' ) { // array skipping
continue;
}

if( substr($class, 0, 7) == 'ArrayOf' ) { // skip 'ArrayOf*' types (from MS.NET, Axis etc.)
continue;
}


$members = array();
for($i=1; $i



" ", substr($parts[$i], 0, strlen($parts[$i])-1) );



// check syntax


if(preg_match(

'/^$/w[/w/d_]*$/', $member)) {


throw

new Exception(

'illegal syntax for member variable: '.$member);


continue;
}



// IMPORTANT: Need to filter out namespace on member if presented


if(strpos($member,

':')) {

// keep the last part
list($tmp, $member) = explode(

':', $member);
}



// OBS: Skip member if already presented (this shouldn't happen, but I've actually seen it in a WSDL-file)


// "It's better to be safe than sorry" (ref Morten Harket)
$add =

true;


foreach($members

as $mem) {


if($mem[

'member'] == $member) {
$add =

false;
}
}


if($add) {
$members[] = array(

'member' => $member,

'type' => $type);
}
}



// gather enumeration values
$values = array();


if(count($members) == 0) {
$values = checkForEnum($dom, $

class);
}

$service[

'types'][] = array(

'class' => $

class,

'members' => $members,

'values' => $values);
print

".";
}
print

"done/n";

print

"Generating code...";
$code =

"";



// add types


foreach($service[

'types']

as $type) {


// $code .= "/**/n";


// $code .= " * ".(isset($type['doc'])?$type['doc']:'')."/n";


// $code .= " * /n";


// $code .= " * @package/n";


// $code .= " * @copyright/n";


// $code .= " *//n";



// add enumeration values
$code .=

"class ".$type[

'class'].

" {/n";


foreach($type[

'values']

as $

value) {
$code .=

" const ".generatePHPSymbol($

value).

" = '$value';/n";
}



// add member variables


foreach($type[

'members']

as $member) {


//$code .= " /* ".$member['type']." *//n";
$code .=

" public /$".$member[

'member'].

"; // ".$member[

'type'].

"/n";
}
$code .=

"}/n/n";



/* print "Writing ".$type['class'].".php...";


$filename = $type['class'].".php";


$fp = fopen($filename, 'w');


fwrite($fp, "
/n");


fclose($fp);


print "ok/n";*/
}



// add service



// page level docblock


//$code .= "/**/n";


//$code .= " * ".$service['class']." class file/n";


//$code .= " * /n";


//$code .= " * @author {author}/n";


//$code .= " * @copyright {copyright}/n";


//$code .= " * @package {package}/n";


//$code .= " *//n/n";




// require types


//foreach($service['types'] as $type) {


// $code .= "/**/n";


// $code .= " * ".$type['class']." class/n";


// $code .= " *//n";


// $code .= "require_once '".$type['class'].".php';/n";


//}

$code .=

"/n";



// class level docblock
$code .=

"/**/n";
$code .=

" * ".$service[

'class'].

" class/n";
$code .=

" * /n";
$code .= parse_doc(

" * ", $service[

'doc']);
$code .=

" * /n";
$code .=

" * @author {author}/n";
$code .=

" * @copyright {copyright}/n";
$code .=

" * @package {package}/n";
$code .=

" *//n";
$code .=

"class ".$service[

'class'].

" extends SoapClient {/n/n";



// add classmap
$code .=

" private static /$classmap = array(/n";


foreach($service[

'types']

as $type) {
$code .=

" '".$type[

'class'].

"' => '".$type[

'class'].

"',/n";
}
$code .=

" );/n/n";
$code .=

" public function ".$service[

'class'].

"(/$wsdl = /"".$service[

'wsdl'].

"/", /$options = array()) {/n";



// initialize classmap (merge)
$code .=

" foreach(self::/$classmap as /$key => /$value) {/n";
$code .=

" if(!isset(/$options['classmap'][/$key])) {/n";
$code .=

" /$options['classmap'][/$key] = /$value;/n";
$code .=

" }/n";
$code .=

" }/n";
$code .=

" parent::__construct(/$wsdl, /$options);/n";
$code .=

" }/n/n";



foreach($service[

'functions']

as $function) {
$code .=

" /**/n";
$code .= parse_doc(

" * ", $function[

'doc']);
$code .=

" */n";

$signature = array();

// used for function signature
$para = array();

// just variable names


if(count($function[

'params']) > 0) {


foreach($function[

'params']

as $param) {
$code .=

" * @param ".(isset($param[0])?$param[0]:

'').

" ".(isset($param[1])?$param[1]:

'').

"/n";


/*$typehint = false;


foreach($service['types'] as $type) {


if($type['class'] == $param[0]) {


$typehint = true;


}


}


$signature[] = ($typehint) ? implode(' ', $param) : $param[1];*/
$signature[] = (in_array($param[0], $primitive_types) or substr($param[0], 0, 7) ==

'ArrayOf') ? $param[1] : implode(

' ', $param);
$para[] = $param[1];
}
}
$code .=

" * @return ".$function[

'return'].

"/n";
$code .=

" *//n";
$code .=

" public function ".$function[

'name'].

"(".implode(

', ', $signature).

") {/n";


// $code .= " return /$this->client->".$function['name']."(".implode(', ', $para).");/n";
$code .=

" return /$this->__soapCall('".$function[

'method'].

"', array(";
$

params = array();


if(count($signature) > 0) {

// add arguments


foreach($signature

as $param) {


if(strpos($param,

' ')) {

// slice
$param = array_pop(explode(

' ', $param));
}
$

params[] = $param;
}


//$code .= "/n ";
$code .= implode(

", ", $

params);


//$code .= "/n ),/n";
}
$code .=

"), ";


//$code .= implode(', ', $signature)."),/n";
$code .=

" array(/n";
$code .=

" 'uri' => '".$targetNamespace.

"',/n";
$code .=

" 'soapaction' => ''/n";
$code .=

" )/n";
$code .=

" );/n";
$code .=

" }/n/n";
}
$code .=

"}/n/n";
print

"done/n";

print

"Writing ".$service[

'class'].

".php...";
$fp = fopen($service[

'class'].

".php",

'w');
fwrite($fp,

"
.$code."?>/n"); fclose($fp); print "done/n"; function parse_doc($prefix, $doc) { $code = ""; $words = split(' ', $doc); $line = $prefix; foreach($words as $word) { $line .= $word.' '; if( strlen($line) > 90 ) { // new line $code .= $line."/n"; $line = $prefix; } } $code .= $line."/n"; return $code; } /** * Look for enumeration * * @param DOM $dom * @param string $class * @return array */ function checkForEnum(&amp;$dom, $class) { $values = array(); $node = findType($dom, $class); if(!$node) { return $values; } $value_list = $node->getElementsByTagName('enumeration'); if($value_list->length == 0) { return $values; } for($i=0; $i<$value_list->length; $i++) { $values[] = $value_list->item($i)->attributes->getNamedItem('value')->nodeValue; } return $values; } /** * Look for a type * * @param DOM $dom * @param string $class * @return DOMNode */ function findType(&amp;$dom, $class) { $types_node = $dom->getElementsByTagName('types')->item(0); $schema_list = $types_node->getElementsByTagName('schema'); for ($i=0; $i<$schema_list->length; $i++) { $children = $schema_list->item($i)->childNodes; for ($j=0; $j<$children->length; $j++) { $node = $children->item($j); if ($node instanceof DOMElement &amp;&amp; $node->hasAttributes() &amp;&amp; $node->attributes->getNamedItem('name')->nodeValue == $class) { return $node; } } } return null; } function generatePHPSymbol($s) { global $reserved_keywords; if(!preg_match('/^[A-Za-z_]/', $s)) { $s = 'value_'.$s; } if(in_array(strtolower($s), $reserved_keywords)) { $s = '_'.$s; } return preg_replace('/[-./s]/', '_', $s); } ?>


只需要将$wsdl变量上填上相应的wsdl即可,调用该php会生成相应的本地类,以下是我使用该工具生成的mapservice的本地类。



class GetDocumentInfo {
}

class GetDocumentInfoResponse {
public $Result; // PropertySet
}

class GetMapCount {
}

class GetMapCountResponse {
public $Result; // int
}

class GetMapName {
public $Index; // int
}

class GetMapNameResponse {
public $Result; // string
}

class GetDefaultMapName {
}

class GetDefaultMapNameResponse {
public $Result; // string
}

class GetServerInfo {
public $MapName; // string
}

class GetServerInfoResponse {
public $Result; // MapServerInfo
}

class ExportMapImage {
public $MapDescription; // MapDescription
public $ImageDescription; // ImageDescription
}

class ExportMapImageResponse {
public $Result; // MapImage
}

class ExportScaleBar {
public $ScaleBar; // ScaleBar
public $MapDescription; // MapDescription
public $MapDisplay; // ImageDisplay
public $BackGroundColor; // Color
public $ImageDescription; // ImageDescription
}

class ExportScaleBarResponse {
public $Result; // ImageResult
}

class Find {
public $MapDescription; // MapDescription
public $MapImageDisplay; // ImageDisplay
public $SearchString; // string
public $Contains; // boolean
public $SearchFields; // string
public $FindOption; // esriFindOption
public $LayerIDs; // ArrayOfInt
}

class FindResponse {
public $Result; // ArrayOfMapServerFindResult
}

class Identify {
public $MapDescription; // MapDescription
public $MapImageDisplay; // ImageDisplay
public $SearchShape; // Geometry
public $Tolerance; // int
public $IdentifyOption; // esriIdentifyOption
public $LayerIDs; // ArrayOfInt
}

class IdentifyResponse {
public $Result; // ArrayOfMapServerIdentifyResult
}

class QueryFeatureCount {
public $MapName; // string
public $LayerID; // int
public $QueryFilter; // QueryFilter
}

class QueryFeatureCountResponse {
public $Result; // int
}

class QueryFeatureIDs {
public $MapName; // string
public $LayerID; // int
public $QueryFilter; // QueryFilter
}

class QueryFeatureIDsResponse {
public $Result; // FIDSet
}

class QueryFeatureData {
public $MapName; // string
public $LayerID; // int
public $QueryFilter; // QueryFilter
}

class QueryFeatureDataResponse {
public $Result; // RecordSet
}

class QueryFeatureCount2 {
public $MapName; // string
public $LayerDescription; // LayerDescription
public $QueryFilter; // QueryFilter
}

class QueryFeatureCount2Response {
public $Result; // int
}

class QueryFeatureIDs2 {
public $MapName; // string
public $LayerDescription; // LayerDescription
public $QueryFilter; // QueryFilter
}

class QueryFeatureIDs2Response {
public $Result; // FIDSet
}

class QueryFeatureData2 {
public $MapName; // string
public $LayerDescription; // LayerDescription
public $QueryFilter; // QueryFilter
public $QueryResultOptions; // QueryResultOptions
}

class QueryFeatureData2Response {
public $Result; // QueryResult
}

class QueryHyperlinks {
public $MapDescription; // MapDescription
public $MapImageDisplay; // ImageDisplay
public $LayerIDs; // ArrayOfInt
}

class QueryHyperlinksResponse {
public $Result; // ArrayOfMapServerHyperlink
}

class ComputeScale {
public $MapDescription; // MapDescription
public $MapImageDisplay; // ImageDisplay
}

class ComputeScaleResponse {
public $Result; // double
}

class ComputeDistance {
public $MapName; // string
public $FromPoint; // Point
public $ToPoint; // Point
public $Units; // esriUnits
}

class ComputeDistanceResponse {
public $Result; // double
}

class ToMapPoints {
public $MapDescription; // MapDescription
public $MapImageDisplay; // ImageDisplay
public $ScreenXValues; // ArrayOfInt
public $ScreenYValues; // ArrayOfInt
}

class ToMapPointsResponse {
public $Result; // Multipoint
}

class FromMapPoints {
public $MapDescription; // MapDescription
public $MapImageDisplay; // ImageDisplay
public $MapPoints; // Multipoint
}

class FromMapPointsResponse {
public $ScreenXValues; // ArrayOfInt
public $ScreenYValues; // ArrayOfInt
}

class GetLegendInfo {
public $MapName; // string
public $LayerIDs; // ArrayOfInt
public $LegendPatch; // MapServerLegendPatch
public $ImageType; // ImageType
}

class GetLegendInfoResponse {
public $Result; // ArrayOfMapServerLegendInfo
}

class GetSQLSyntaxInfo {
public $MapName; // string
public $LayerID; // int
}

class GetSQLSyntaxInfoResponse {
public $Result; // SQLSyntaxInfo
}

class GetSupportedImageReturnTypes {
}

class GetSupportedImageReturnTypesResponse {
public $Result; // esriImageReturnType
}

class IsFixedScaleMap {
public $MapName; // string
}

class IsFixedScaleMapResponse {
public $Result; // boolean
}

class HasSingleFusedMapCache {
public $MapName; // string
}

class HasSingleFusedMapCacheResponse {
public $Result; // boolean
}

class GetTileCacheInfo {
public $MapName; // string
}

class GetTileCacheInfoResponse {
public $Result; // TileCacheInfo
}

class GetMapTile {
public $MapName; // string
public $Level; // int
public $Row; // int
public $Column; // int
public $Format; // string
}

class GetMapTileResponse {
public $Result; // base64Binary
}

class HasLayerCache {
public $MapName; // string
public $LayerID; // int
}

class HasLayerCacheResponse {
public $Result; // boolean
}

class GetLayerTile {
public $MapName; // string
public $LayerID; // int
public $Level; // int
public $Row; // int
public $Column; // int
public $Format; // string
}

class GetLayerTileResponse {
public $Result; // base64Binary
}

class GetVirtualCacheDirectory {
public $MapName; // string
public $LayerID; // int
}

class GetVirtualCacheDirectoryResponse {
public $Result; // string
}

class GetCacheName {
public $MapName; // string
public $LayerID; // int
}

class GetCacheNameResponse {
public $Result; // string
}

class GetTileImageInfo {
public $MapName; // string
}

class GetTileImageInfoResponse {
public $Result; // TileImageInfo
}

class GetCacheControlInfo {
public $MapName; // string
}

class GetCacheControlInfoResponse {
public $Result; // CacheControlInfo
}

class GetServiceConfigurationInfo {
}

class GetServiceConfigurationInfoResponse {
public $Result; // PropertySet
}

class GetCacheDescriptionInfo {
public $MapName; // string
}

class GetCacheDescriptionInfoResponse {
public $Result; // CacheDescriptionInfo
}

class QueryRowCount {
public $MapName; // string
public $MapTableDescription; // MapTableDescription
public $QueryFilter; // QueryFilter
}

class QueryRowCountResponse {
public $Result; // int
}

class QueryRowIDs {
public $MapName; // string
public $MapTableDescription; // MapTableDescription
public $QueryFilter; // QueryFilter
}

class QueryRowIDsResponse {
public $Result; // ArrayOfInt
}

class QueryData {
public $MapName; // string
public $MapTableDescription; // MapTableDescription
public $QueryFilter; // QueryFilter
public $QueryResultOptions; // QueryResultOptions
}

class QueryDataResponse {
public $Result; // QueryResult
}

class QueryRelatedRecords {
public $MapName; // string
public $SourceTableID; // int
public $SourceFIDSet; // FIDSet
public $RelateDescription; // RelateDescription
}

class QueryRelatedRecordsResponse {
public $Result; // QueryResult
}

class GetCacheStorageInfo {
public $MapName; // string
}

class GetCacheStorageInfoResponse {
public $Result; // CacheStorageInfo
}

class QueryRasterValue {
public $MapName; // string
public $SourceTableID; // int
public $RowIDs; // ArrayOfInt
public $FieldName; // string
public $ImageType; // ImageType
}

class QueryRasterValueResponse {
public $Result; // ArrayOfImageResult
}

class QueryAttachmentInfos {
public $MapName; // string
public $TableID; // int
public $RowIDs; // ArrayOfInt
}

class QueryAttachmentInfosResponse {
public $Result; // ArrayOfAttachmentInfo
}

class QueryAttachmentData {
public $MapName; // string
public $TableID; // int
public $AttachmentIDs; // ArrayOfInt
public $TransportType; // esriTransportType
}

class QueryAttachmentDataResponse {
public $Result; // ArrayOfAttachmentData
}

class QueryHTMLPopups {
public $MapName; // string
public $TableID; // int
public $RowIDs; // ArrayOfInt
}

class QueryHTMLPopupsResponse {
public $Result; // ArrayOfString
}

class GetDefaultLayerDrawingDescriptions {
public $MapName; // string
public $LayerIDs; // ArrayOfInt
public $SymbolOutputOptions; // ServerSymbolOutputOptions
}

class GetDefaultLayerDrawingDescriptionsResponse {
public $Result; // ArrayOfLayerDrawingDescription
}

class GetMapTableSubtypeInfos {
public $MapName; // string
public $TableIDs; // ArrayOfInt
}

class GetMapTableSubtypeInfosResponse {
public $Result; // ArrayOfMapTableSubtypeInfo
}

class esriIdentifyOption {
const esriIdentifyTopmost = 'esriIdentifyTopmost';
const esriIdentifyAllLayers = 'esriIdentifyAllLayers';
const esriIdentifyVisibleLayers = 'esriIdentifyVisibleLayers';
const esriIdentifyTopOneWithHTMLPopup = 'esriIdentifyTopOneWithHTMLPopup';
const esriIdentifyVisibleWithHTMLPopup = 'esriIdentifyVisibleWithHTMLPopup';
}

class esriServerHTMLPopupType {
const esriServerHTMLPopupTypeNone = 'esriServerHTMLPopupTypeNone';
const esriServerHTMLPopupTypeAsURL = 'esriServerHTMLPopupTypeAsURL';
const esriServerHTMLPopupTypeAsHTMLText = 'esriServerHTMLPopupTypeAsHTMLText';
}

class esriMapCacheStorageFormat {
const esriMapCacheStorageModeCompact = 'esriMapCacheStorageModeCompact';
const esriMapCacheStorageModeExploded = 'esriMapCacheStorageModeExploded';
}

class esriFindOption {
const esriFindVisibleLayers = 'esriFindVisibleLayers';
const esriFindAllLayers = 'esriFindAllLayers';
}

class TileCacheInfo {
public $SpatialReference; // SpatialReference
public $TileOrigin; // Point
public $TileCols; // int
public $TileRows; // int
public $DPI; // int
public $LODInfos; // ArrayOfLODInfo
}

class LODInfo {
public $LevelID; // int
public $Scale; // double
public $Resolution; // double
}
class AreaPatch {
}

class CenterAndScale {
public $Center; // Point
public $Scale; // double
public $DPI; // double
public $DevBottom; // int
public $DevLeft; // int
public $DevTop; // int
public $DevRight; // int
}

class CenterAndSize {
public $Center; // Point
public $Height; // double
public $Width; // double
public $Units; // string
}

class FeatureExtent {
public $DefaultScale; // double
public $ExpandRatio; // double
public $FeatureIDs; // ArrayOfInt
public $LayerID; // int
public $MapName; // string
}

class ImageDescription {
public $ImageType; // ImageType
public $ImageDisplay; // ImageDisplay
}

class ImageDisplay {
public $ImageHeight; // int
public $ImageWidth; // int
public $ImageDPI; // double
public $TransparentColor; // Color
}

class ImageResult {
public $ImageData; // base64Binary
public $ImageURL; // string
public $ImageHeight; // int
public $ImageWidth; // int
public $ImageDPI; // double
public $ImageType; // string
}

class esriImageFormat {
const esriImageNone = 'esriImageNone';
const esriImageBMP = 'esriImageBMP';
const esriImageJPG = 'esriImageJPG';
const esriImageDIB = 'esriImageDIB';
const esriImageTIFF = 'esriImageTIFF';
const esriImagePNG = 'esriImagePNG';
const esriImagePNG24 = 'esriImagePNG24';
const esriImageEMF = 'esriImageEMF';
const esriImagePS = 'esriImagePS';
const esriImagePDF = 'esriImagePDF';
const esriImageAI = 'esriImageAI';
const esriImageGIF = 'esriImageGIF';
const esriImageSVG = 'esriImageSVG';
const esriImagePNG32 = 'esriImagePNG32';
const esriImageJPGPNG = 'esriImageJPGPNG';
}

class esriScaleBarPos {
const esriScaleBarAbove = 'esriScaleBarAbove';
const esriScaleBarBeforeLabels = 'esriScaleBarBeforeLabels';
const esriScaleBarAfterLabels = 'esriScaleBarAfterLabels';
const esriScaleBarBeforeBar = 'esriScaleBarBeforeBar';
const esriScaleBarAfterBar = 'esriScaleBarAfterBar';
const esriScaleBarBelow = 'esriScaleBarBelow';
}

class esriVertPosEnum {
const esriAbove = 'esriAbove';
const esriTop = 'esriTop';
const esriOn = 'esriOn';
const esriBottom = 'esriBottom';
const esriBelow = 'esriBelow';
}

class esriScaleBarFrequency {
const esriScaleBarNone = 'esriScaleBarNone';
const esriScaleBarOne = 'esriScaleBarOne';
const esriScaleBarMajorDivisions = 'esriScaleBarMajorDivisions';
const esriScaleBarDivisions = 'esriScaleBarDivisions';
const esriScaleBarDivisionsAndFirstMidpoint = 'esriScaleBarDivisionsAndFirstMidpoint';
const esriScaleBarDivisionsAndFirstSubdivisions = 'esriScaleBarDivisionsAndFirstSubdivisions';
const esriScaleBarDivisionsAndSubdivisions = 'esriScaleBarDivisionsAndSubdivisions';
}

class esriScaleBarResizeHint {
const esriScaleBarFixed = 'esriScaleBarFixed';
const esriScaleBarAutoDivision = 'esriScaleBarAutoDivision';
const esriScaleBarAutoDivisions = 'esriScaleBarAutoDivisions';
}

class esriImageReturnType {
const esriImageReturnURL = 'esriImageReturnURL';
const esriImageReturnMimeData = 'esriImageReturnMimeData';
}

class ImageType {
public $ImageFormat; // esriImageFormat
public $ImageReturnType; // esriImageReturnType
}

class LayerDescription {
public $LayerID; // int
public $Visible; // boolean
public $ShowLabels; // boolean
public $ScaleSymbols; // boolean
public $SelectionFeatures; // ArrayOfInt
public $SelectionColor; // Color
public $SelectionSymbol; // Symbol
public $SetSelectionSymbol; // boolean
public $SelectionBufferDistance; // double
public $ShowSelectionBuffer; // boolean
public $DefinitionExpression; // string
public $SourceID; // string
public $SelectionBufferSymbol; // FillSymbol
public $LayerResultOptions; // LayerResultOptions
public $UseTime; // boolean
public $TimeDataCumulative; // boolean
public $TimeOffset; // double
public $TimeOffsetUnits; // esriTimeUnits
}

class LayerResultOptions {
public $IncludeGeometry; // boolean
public $GeometryResultOptions; // GeometryResultOptions
public $ReturnFieldNamesInResults; // boolean
public $FormatValuesInResults; // boolean
}

class LegendClass {
public $Symbol; // Symbol
public $Label; // string
public $Description; // string
public $LegendClassFormat; // LegendClassFormat
}

class LegendClassFormat {
public $LabelSymbol; // Symbol
public $DescriptionSymbol; // Symbol
public $LinePatch; // LinePatch
public $AreaPatch; // AreaPatch
public $PatchWidth; // double
public $PatchHeight; // double
}

class LinePatch

0 个评论

要回复文章请先登录注册