< Developer Manual

New Plugins >

1. Calling Plugins

This chapter describes the structure of SOAP calls to CartoWeb server methods in order to obtain cartographic data.

Warning

Due to some CartoWeb evolutions, please note that some parts of the current chapter may need some updates!

Global WSDL code can be found in file CARTOWEB_HOME/server/cartoserver.wsdl. WSDL code specific to plugins are located in PLUGIN_HOME/common/plugin_name.wsdl.inc. Interesting parts from these files are copied in the following sections.

Complete WSDL code dynamically generated for a map ID is accessible at the URL CARTOWEB_URL/cartoserver.wsdl.php?mapId=project_name.mapfile_name.

SOAP method getMapInfo is used to retrieve server configuration information, such as available layers, initial state, etc.. It shouldn't be called each time a map is requested. A mechanism based on a timestamp is available to be sure configuration is up-to-date (see Section 1.2, “Call to getMapInfo”).

SOAP method getMap is used each time a new map or related information are needed.

1.1. Standard Structures

1.1.1. Simple Types

These types are used in different other structures.

<complexType name="ArrayOfString">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="xsd:string[]"/>
    </restriction>
  </complexContent>
</complexType>

  • array - list of character strings

<complexType name="Dimension">
  <all>
    <element name="width" type="xsd:int"/>
    <element name="height" type="xsd:int"/>
  </all>
</complexType>

  • width - width in pixels
  • height - height in pixels

<complexType name="GeoDimension">
  <all>
    <element name="dimension" type="types:Dimension"/>
    <element name="bbox" type="types:Bbox"/>
  </all>
</complexType>

1.1.2. Shapes

These types define a hierarchy of shapes. As heritage and polymorphism cannot be used, type Shape includes all attibutes of its children types.

<complexType name="Bbox">
  <all>
    <element name="minx" type="xsd:double"/>
    <element name="miny" type="xsd:double"/>
    <element name="maxx" type="xsd:double"/>
    <element name="maxy" type="xsd:double"/>
  </all>
</complexType>

  • minx - minimum x coordinate
  • miny - minimum y coordinate
  • maxx - maximum x coordinate
  • maxy - maximum y coordinate

<complexType name="Point">
  <all>
    <element name="x" type="xsd:double"/>
    <element name="y" type="xsd:double"/>
  </all>
</complexType>

  • x - x coordinate
  • y - y coordinate

<complexType name="ArrayOfPoint">
  <complexContent>
    <restriction base="enc11:Array">
      <attribute ref="enc11:arrayType" wsdl:arrayType="types:Point[]"/>
    </restriction>
  </complexContent>
</complexType>

  • array - list of points

<complexType name="Shape">
  <all>
    <element name="className" type="xsd:string"/>
    <element name="x" type="xsd:double" minOccurs="0"/>
    <element name="y" type="xsd:double" minOccurs="0"/>
    <element name="minx" type="xsd:double" minOccurs="0"/>
    <element name="miny" type="xsd:double" minOccurs="0"/>
    <element name="maxx" type="xsd:double" minOccurs="0"/>
    <element name="maxy" type="xsd:double" minOccurs="0"/>
    <element name="points" type="types:ArrayOfPoint" minOccurs="0"/>
  </all>
</complexType>