Changes between Version 28 and Version 29 of ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
- Timestamp:
- Oct 16, 2010, 12:22:07 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ZooWorkshop/FOSS4GJapan/CreatingOGRBasedWebServices
v28 v29 226 226 }}} 227 227 228 Please note that the {{{ addToMap}}} function is able to create or update an existing {{{map}}}. Indeed, if a {{{map}}} called « value » allready exists, then its value will be updated automatically.228 Please note that the {{{setMapInMaps}}} function is able to create or update an existing {{{map}}}. Indeed, if a {{{map}}} called « value » allready exists, then its value will be updated automatically. 229 229 230 230 This datatype is really important cause it is used in every C based ZOO Services. It is also the same representation used in other languages but using their respectives datatypes. For Example in Python, the dictionaries datatype is used, so manipulation is much easier. 231 231 232 Here is an example of a {{{maps}}}used in Python language (this is a summarized version of the main configaration {{{maps}}}) :232 Here is an example of the correspoding {{{maps}}} datatype used in Python language (this is a summarized version of the main configaration {{{maps}}}) : 233 233 234 234 {{{ … … 380 380 The Boundary ZOO Service is now implemented and you need to compile it to produce a Shared Library. As you just used functions defined in service.h ({{{getMapFromMaps}}} and {{{addToMap}}}), you must include this file in your C code. The same requirement is needed to be able to use the errorException function declared in {{{zoo-kernel/service_internal.h}}}, you also must link your service object file to the {{{zoo- kernel/service_internal.o}}} in order to use {{{errorException}}} on runtime. You must then include the required files to access the libxml2 and OGR C-API. 381 381 382 For the need of the Shared Library, you have to put your code in a block declared as extern "C". The final Service code should be stored in a service.c file located in the root of the Services Provider directory (so in {{{/home/zoows/sources/zoo-services/ws_sp}}}). It should look like this :382 For the need of the Shared Library, you have to put your code in a block declared as {{{extern "C"}}}. The final Service code should be stored in a service.c file located in the root of the Services Provider directory (so in {{{/home/zoows/sources/zoo-services/ws_sp}}}). It should look like this : 383 383 384 384 {{{