Академический Документы
Профессиональный Документы
Культура Документы
275
URL= service to the portType, it should be extended from the
http://127.0.0.1:8080/geoserver/wms?bbox=-130,24,-66,5 standard NotificationProducer portType.
0&styles=population&Format=image/png&request=Get Assume the Getmap operation return the target map’s
Map&layers=topp:states&width=550&height=250&srs=E URL address as a String, and then we can define the
PSG:4326 GetMap interface in the portType element as:
As we can see from this URL, every time we make a <portType name="MapServicePortType"
new Getmap quest, many parameters with the same value wsdlpp:extends="wsrpw:GetResourceProperty
in the previous call are send again in the URL. Since the wsrpw:GetMultipleResourceProperties
most frequently change parameter is BBOX and the other wsrpw:SetResourceProperties
parameters are comparatively much stable, we choose the wsrpw:QueryResourceProperties"
FORMAT, VERSION, LAYERS, WIDTH, HEIGHT and wsdlpp:extends="wsrpw:GetResourceProperty
SRS as the state information. Since we will use the wsntw:NotificationProducer"
Globus Toolkit to implement the service later, here we wsrp:ResourceProperties="tns:MapServiceResourcePrope
use the WSRF and Globus specific WSDL to redefine the rties">
interface. The state information can be defined as <operation name="GetMap">
resource properties using WSDL like this: <input message="tns:GetMapInputMessage"/>
<!-- RESOURCE PROPERTIES --> <output message="tns:GetMapOutputMessage"/>
<xsd:element name="VERSION" type="xsd:String"/> </operation>
<xsd:element name="LAYERS" …….
type="xsd:String"/> </portType>
<xsd:element name="STYLES" type="xsd:String"/> <types>
<xsd:element name="SRS" type="xsd:String"/> …… <!-- REQUESTS AND RESPONSES -->
<xsd:element name="FORMAT" type="xsd:String"/> <xsd:element name="GetMap" >
…….. <xsd:complexType name=”BBox”>
<xsd:element name="MapServiceResourceProperties"> <xsd:sequence>
<xsd:complexType> <xsd:element name="minx" type="xsd:Float"/>
<xsd:sequence> <xsd:element name="miny" type="xsd:Float"/>
<xsd:element ref="tns:VERSION" minOccurs="1" <xsd:element name="maxx" type="xsd:Float"/>
maxOccurs="1"/> <xsd:element name="maxy" type="xsd:Float"/>
<xsd:element ref="tns: LAYERS " minOccurs="1" …….
maxOccurs="1"/> </xsd:sequence>
<xsd:element ref="tns: STYLES " minOccurs="1" </xsd:complexType>
maxOccurs="1"/> <xsd:element name="GetMapResponse"
<xsd:element ref="tns: SRS " minOccurs="1" type=”xsd:String”/>
maxOccurs="1"/> The other two portType can be defined the same way.
<xsd:element ref="tns: FORMAT " minOccurs="1"
maxOccurs="1"/> 3.3 Implement the Service
......
</xsd:sequence> After define the interface using WSDL, we use Globus
</xsd:complexType> Toolkit 4 and JAVA to program it. The GT4 is a famous
</xsd:element> software toolkit, developed by The Globus Alliance,
which we can use to program grid-based applications.
3.2 PortType Definition First, a QNames interface is defined for all the
members of ResourceProperties according to the WSDL
We have set some input message as definition. Next, according to the requirement of WSRF
ResourceProperties, we need not to include the layerlist and GT4, we split the implementation into three classes,
and stylelist in the message again since at the most one for the Map Service, one for the Resource and one for
situation it is the same. And now the Getmap interface the ResouceHome. Here we use the Singleton design
can be predigest to only one parameter: BBox. model to implement the service. The ResourcrHome class
There are a bit different in the portType definition is extended from an existing class included in the GT
between the normal WSDL and the WSRF specific toolkit, SingletonResourceHome. The only thing to do is
WSDL. The most difference is the Resource properties implement the findSingleton method in it.
attribute of portType element, which is used to descript The MapserviceResource class implements the
the state information. Furthermore, to add notification Resource, ResourceProperties and TopicListAccessor
interface of GT4 JAVA WS-Core library. The
276
MapService class has three main methods corresponding same way since the main information is kept in the server
to the OWMS interface. To simplify its implementation, side.
we set the initial value for the ResourceProperties in the Our current work has not incorporate many useful
MapService construct method. We also use an open WSRF functions such as lifecycle management and
source OWMS implementation - Geoserver as the map security. In the future, we will incorporate it into our
engine. While a client calls the Getmap method of the system. And high performance data transfer is one
map service, the method just creates an OWMS Getmap prominent challenge in GIS service, we also needs to do
request URI based on the state information and the value further investigate on it under Grid environment. Now,
of BBox parameter. Then it calls the Geoserver WMS there is a growing interest amongst OGC members to
using the URI. When got the address of the target map, it explore Grid technology. The incorporating of OGC
returns the address to the client. technology with the WSRF functionalities will provides
more personalized, efficient on-demand geospatial data
3.4 A Simple Client Instance access and services to data users.
This simple client only tests how the Mapservice can Reference
keep state and invocate continuous GetMap request
without sending duplicated information as OGC: WMS [1] OGC, OWS Messaging Framework (OMF), Open GIS
does. Since the initial value for generate a getMap request Consortium, Inc. OGC Document 03-029,2003
has been assigned to the Mapservice in its construct
method, this client do not use the set/get [2] Aijun Chen, “An optimized Grid-based, OGC
standards-compliant collaborative software system for
ResourceProperties method. It just makes two getMap call serving NASA geospatial data”, Proceedings of the 30th
with different BBOX value to get two maps with the Annual IEEE/NASA Software Engineering, 2006
different scale. Its code and result is listed below. pp.159-166.
MapServiceAddressingLocator locator = new
MapServiceAddressingLocator(); [3] The Globus Project, “The Globus Toolkit”,
EndpointReferenceType endpoint = new http://www.globus.org/toolkit, 2006.
EndpointReferenceType();
endpoint.setAddress(new Address(URI)); [4] P. Vretanos, OpenGIS Web Feature Service (WFS)
MapPortType map = Implementation Specification, version 1.1, OGC 2005.
locator.getMapPortTypePort(endpoint); [5] Zaslavsky, C. Baru, “Grid-enabled Mediation Services
……. for Geospatial Information”, Next Generation Geospatial
Map.getMap(BBox1); Information, Volume 1, Part 2 July 2005, pp. 15-25.
Map.getMap(BBox2);
[6] Ian Foster, Carl Kesslman, “The Physiology of the
Grid-An Open Grid Services Architecture for
Distributed Systems Integration”,
http://www.globus.org/research/papers/ogsa.pdf
277