[mapserver-commits] r12570 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Sep 21 18:46:46 EDT 2011


Author: schpidi
Date: 2011-09-21 15:46:46 -0700 (Wed, 21 Sep 2011)
New Revision: 12570

Modified:
   trunk/mapserver/mapows.c
   trunk/mapserver/mapwcs11.c
   trunk/mapserver/mapwfs11.c
Log:
Fixed issues introduced with ticket #3925 prohibiting compilation of 'mapows.c' when the configuration switch '--with-gdal' is omitted.
Fixed compilation issues with WFS and WCS 1.1 when compiled with the '--without-xml2-config' configuration switch.


Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c	2011-09-21 14:41:58 UTC (rev 12569)
+++ trunk/mapserver/mapows.c	2011-09-21 22:46:46 UTC (rev 12570)
@@ -31,9 +31,9 @@
 #include "maptime.h"
 #include "maptemplate.h"
 
-#ifdef USE_LIBXML2
+#if defined(USE_LIBXML2)
     #include "maplibxml2.h"
-#else
+#elif defined(USE_GDAL)
     #include "cpl_minixml.h"
     #include "cpl_error.h"
 #endif
@@ -74,9 +74,9 @@
 #if defined(USE_LIBXML2)
         xmlFreeDoc(ows_request->document);
         xmlCleanupParser();
-#else /* defined(USE_LIBXML2) */
+#elif defined(USE_GDAL)
         CPLDestroyXMLNode(ows_request->document);
-#endif /* defined(USE_LIBXML2) */
+#endif
     }
 }
 
@@ -127,12 +127,12 @@
     {
 #if defined(USE_LIBXML2)
         xmlNodePtr root = NULL;
-#else
+#elif defined(USE_GDAL)
         CPLXMLNode *temp;
 #endif
         if (!request->postrequest || !strlen(request->postrequest))
         {
-            msSetError(MS_WCSERR, "POST request is empty.",
+            msSetError(MS_OWSERR, "POST request is empty.",
                        "msOWSPreParseRequest()");
             return MS_FAILURE;
         }
@@ -144,7 +144,7 @@
             || (root = xmlDocGetRootElement(ows_request->document)) == NULL)
         {
             xmlErrorPtr error = xmlGetLastError();
-            msSetError(MS_WCSERR, "XML parsing error: %s",
+            msSetError(MS_OWSERR, "XML parsing error: %s",
                        "msOWSPreParseRequest()", error->message);
             return MS_FAILURE;
         }
@@ -154,12 +154,12 @@
         ows_request->version = (char *) xmlGetProp(root, BAD_CAST "version");
         ows_request->request = msStrdup((char *) root->name);
         
-#else /* defined(USE_LIBXML2) */
+#elif defined(USE_GDAL)
         /* parse with CPLXML */
         ows_request->document = CPLParseXMLString(request->postrequest);
         if (ows_request->document == NULL)
         {
-            msSetError(MS_WCSERR, "XML parsing error: %s",
+            msSetError(MS_OWSERR, "XML parsing error: %s",
                        "msOWSPreParseRequest()", CPLGetLastErrorMsg());
             return MS_FAILURE;
         }
@@ -187,6 +187,12 @@
                 continue;
             }
         }
+#else
+        /* could not parse XML since no parser was compiled */
+        msSetError(MS_OWSERR, "Could not parse the POST XML since MapServer"
+                              "was not compiled with libxml2 or GDAL.",
+                   "msOWSPreParseRequest()");
+        return MS_FAILURE;
 #endif /* defined(USE_LIBXML2) */
     }
     

Modified: trunk/mapserver/mapwcs11.c
===================================================================
--- trunk/mapserver/mapwcs11.c	2011-09-21 14:41:58 UTC (rev 12569)
+++ trunk/mapserver/mapwcs11.c	2011-09-21 22:46:46 UTC (rev 12570)
@@ -1380,8 +1380,8 @@
 
 /* ==================================================================== */
 
-int msWCSDescribeCoverage11(mapObj *map, wcsParamsObj *params)
-
+int msWCSDescribeCoverage11(mapObj *map, wcsParamsObj *params,
+                            owsRequestObj *ows_request)
 {
     msSetError( MS_WCSERR,
                 "WCS 1.1 request made, but mapserver requires libxml2 for WCS 1.1 services and this is not configured.",
@@ -1392,8 +1392,7 @@
 /* ==================================================================== */
 
 int msWCSGetCapabilities11(mapObj *map, wcsParamsObj *params, 
-                                  cgiRequestObj *req)
-
+                           cgiRequestObj *req, owsRequestObj *ows_request)
 {
     msSetError( MS_WCSERR,
                 "WCS 1.1 request made, but mapserver requires libxml2 for WCS 1.1 services and this is not configured.",

Modified: trunk/mapserver/mapwfs11.c
===================================================================
--- trunk/mapserver/mapwfs11.c	2011-09-21 14:41:58 UTC (rev 12569)
+++ trunk/mapserver/mapwfs11.c	2011-09-21 22:46:46 UTC (rev 12570)
@@ -494,7 +494,7 @@
 
 
 int msWFSGetCapabilities11(mapObj *map, wfsParamsObj *params, 
-                           cgiRequestObj *req)
+                           cgiRequestObj *req, owsRequestObj *ows_request)
 
 {
     msSetError( MS_WFSERR,



More information about the mapserver-commits mailing list