Opened 17 years ago

Closed 17 years ago

#1954 closed enhancement (fixed)

[OWS-Common] abstraction of common XML

Reported by: tomkralidis Owned by: tomkralidis
Priority: high Milestone: 5.0 release
Component: SOS Server Version: 5.0
Severity: normal Keywords:
Cc: bartvde@…

Description

(I've put this as an SOS enhancement as I think this will be the best place for
initial implementation, since SOS is not used very much yet, but this applies an
an enhancement to all OGC MapServer code).

Future OGC specifications (including all the OWSs supported by
MapServer) will obey the OWS Common Specification 1.0.0.  More info about OWS
Common 1.0.0 is at:

http://www.opengeospatial.org/standards/common

It would be a good idea to begin to build this as OWS specs merge to OWS Common.
 Defining a set of msOWSCommon functions would mean simply calling them in
future code of supporting OGC Web Services (i.e. WFS 1.1.0 is already there, in
addition to the forthcoming SOS 1.0.0.).

This file would be a set of routines to cover the OWS Common Specification, and
return XML objects which adhere to OWS Common.

Change History (5)

comment:1 by tomkralidis, 17 years ago

FYI: I've started working on mapowscommon.c / mapowscommon.h and will commit
after more testing.

comment:2 by dmorissette, 17 years ago

Cc: assefa@… dmorissette@… added
Owner: changed from mapserverbugs to tomkralidis
Reassigned bug to Tom.

comment:3 by tomkralidis, 17 years ago

Update:

- I've committed a first pass of mapowscommon.c/h to CVS.  See mapowscommon.h
for functions that can be used by calling code
- I've updated mapogcsos.c to use mapowscommon.c functions for exceptions,
ServiceIdentification, and ServiceProvider
- updated Makefile.in and Makefile.vc

I have tested this code with no errors or warnings on FC4.  Assefa has verified
that this works on Win32 as well from a copy of the code I emailed to him a few
days ago.

Issues:

- when running an OGC:SOS GetCapabilties through valgrind, I get complaints of
memory leak:

==15389== 1735 (660 direct, 1075 indirect) bytes in 33 blocks are definitely
lost in loss record 20 of 25
==15389==    at 0x1B909222: malloc (vg_replace_malloc.c:130)
==15389==    by 0x13DE49: xmlNewNs (in /usr/lib/libxml2.so.2.6.20)
==15389==    by 0x80D3CAD: msOWSCommonServiceIdentification (mapowscommon.c:65)
==15389==    by 0x80D090D: msSOSGetCapabilities (mapogcsos.c:956)
==15389==    by 0x80D29D8: msSOSDispatch (mapogcsos.c:1926)
==15389==    by 0x80A2BF5: msOWSDispatch (mapows.c:299)
==15389==    by 0x8055082: main (mapserv.c:1217)

I tried applying libxml2's xmlFreeNs function at the end of
msOWSCommonServiceIdenfitication, and that fixed the loss.  However, the XML on
output was not well-formed (??).  So I reverted for now.  NB: there are a slew
of other memory issues when running through valgrind, but I thought I'd specify
mapowscommon.c ones for now.

At any rate, if some folks can give this a go, and the code a 'once over', to
verify that I've done things in an acceptable manner to rest of the development
team, that would be much appreciated.

in reply to:  description comment:4 by anonymous, 17 years ago

Milestone: 5.0 release
Type: defectenhancement
Version: unspecified5.0

Replying to tomkralidis:

(I've put this as an SOS enhancement as I think this will be the best place for
initial implementation, since SOS is not used very much yet, but this applies an
an enhancement to all OGC MapServer code).

Future OGC specifications (including all the OWSs supported by
MapServer) will obey the OWS Common Specification 1.0.0.  More info about OWS
Common 1.0.0 is at:

http://www.opengeospatial.org/standards/common

It would be a good idea to begin to build this as OWS specs merge to OWS Common.
 Defining a set of msOWSCommon functions would mean simply calling them in
future code of supporting OGC Web Services (i.e. WFS 1.1.0 is already there, in
addition to the forthcoming SOS 1.0.0.).

This file would be a set of routines to cover the OWS Common Specification, and
return XML objects which adhere to OWS Common.

comment:5 by tomkralidis, 17 years ago

Resolution: fixed
Status: newclosed

Done. mapowscommon.c implemented and ready for use by calling code.

Note: See TracTickets for help on using tickets.