[mapserver-commits] r11726 - in trunk: mapserver msautotest/wxs/expected

svn at osgeo.org svn at osgeo.org
Thu May 19 06:03:39 EDT 2011


Author: schpidi
Date: 2011-05-19 03:03:39 -0700 (Thu, 19 May 2011)
New Revision: 11726

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapowscommon.c
   trunk/mapserver/mapwcs20.c
   trunk/msautotest/wxs/expected/wcs_20_cap.xml
   trunk/msautotest/wxs/expected/wcs_20_cap_accept_versions.xml
   trunk/msautotest/wxs/expected/wcs_20_cap_sections_all.xml
   trunk/msautotest/wxs/expected/wcs_20_cap_sections_all_specific.xml
   trunk/msautotest/wxs/expected/wcs_20_cap_sections_operations_metadata.xml
   trunk/msautotest/wxs/expected/wcs_20_cap_updatesequence.xml
   trunk/msautotest/wxs/expected/wcs_20_post_cap.xml
Log:
Adjusting OperationsMetadata for POST in WCS 2.0 GetCapabilities response.


Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/mapserver/HISTORY.TXT	2011-05-19 10:03:39 UTC (rev 11726)
@@ -15,6 +15,8 @@
 Current Version (SVN trunk, 6.1-dev, future 6.2): 
 ------------------------------------------------- 
 
+- Adjusted OperationsMetadata for POST in WCS 2.0 GetCapabilities response
+
 - Fix for the warnings in mapunion.c (#3880)
 
 - SLD: correct when same layer is used with multiple styles (#1602)

Modified: trunk/mapserver/mapowscommon.c
===================================================================
--- trunk/mapserver/mapowscommon.c	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/mapserver/mapowscommon.c	2011-05-19 10:03:39 UTC (rev 11726)
@@ -410,7 +410,7 @@
   if (version == OWS_1_0_0) {
     msLibXml2GenerateList(psRootNode, psNsOws, "Value", values, ',');
   }
-  if (version == OWS_1_1_0) {
+  if (version == OWS_1_1_0 || version == OWS_2_0_0) {
     psNode = xmlNewChild(psRootNode, psNsOws, BAD_CAST "AllowedValues", NULL);
     msLibXml2GenerateList(psNode, psNsOws, "Value", values, ',');
   }

Modified: trunk/mapserver/mapwcs20.c
===================================================================
--- trunk/mapserver/mapwcs20.c	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/mapserver/mapwcs20.c	2011-05-19 10:03:39 UTC (rev 11726)
@@ -2873,7 +2873,10 @@
                            wcs20ParamsObjPtr params, owsRequestObj *ows_request)
 {
     xmlDocPtr psDoc = NULL;       /* document pointer */
-    xmlNodePtr psRootNode, psOperationsNode, psServiceMetadataNode, psNode;
+    xmlNodePtr psRootNode,
+            psOperationsNode,
+            psServiceMetadataNode,
+            psNode;
     const char *updatesequence = NULL;
     xmlNsPtr psOwsNs = NULL,
             psXLinkNs = NULL,
@@ -2907,8 +2910,6 @@
 
     xmlNewProp(psRootNode, BAD_CAST "version", BAD_CAST params->version );
 
-    /* TODO: remove updatesequence? */
-
     updatesequence = msOWSLookupMetadata(&(map->web.metadata), "CO", "updatesequence");
     if (params->updatesequence != NULL)
     {
@@ -2971,6 +2972,10 @@
         psNode = msOWSCommonOperationsMetadataOperation(
             psOwsNs, psXLinkNs,
             "GetCapabilities", OWS_METHOD_GETPOST, script_url_encoded);
+        
+        xmlAddChild(psNode->last->last->last,
+            msOWSCommonOperationsMetadataDomainType(OWS_2_0_0, psOwsNs, "Constraint",
+                                                    "PostEncoding", "XML"));
         xmlAddChild(psOperationsNode, psNode);
 
         /* -------------------------------------------------------------------- */
@@ -2981,6 +2986,9 @@
             psNode = msOWSCommonOperationsMetadataOperation(
                 psOwsNs, psXLinkNs,
                 "DescribeCoverage", OWS_METHOD_GETPOST, script_url_encoded);
+            xmlAddChild(psNode->last->last->last,
+                msOWSCommonOperationsMetadataDomainType(OWS_2_0_0, psOwsNs, "Constraint",
+                                                        "PostEncoding", "XML"));
             xmlAddChild(psOperationsNode, psNode);
         }
 
@@ -2992,10 +3000,13 @@
             psNode = msOWSCommonOperationsMetadataOperation(
                 psOwsNs, psXLinkNs,
                 "GetCoverage", OWS_METHOD_GETPOST, script_url_encoded);
+            
+            xmlAddChild(psNode->last->last->last,
+                msOWSCommonOperationsMetadataDomainType(OWS_2_0_0, psOwsNs, "Constraint",
+                                                        "PostEncoding", "XML"));
             xmlAddChild(psOperationsNode, psNode);
-            
-            msFree(script_url_encoded);
         }
+        msFree(script_url_encoded);
     }
 
     /* -------------------------------------------------------------------- */

Modified: trunk/msautotest/wxs/expected/wcs_20_cap.xml
===================================================================
--- trunk/msautotest/wxs/expected/wcs_20_cap.xml	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/msautotest/wxs/expected/wcs_20_cap.xml	2011-05-19 10:03:39 UTC (rev 11726)
@@ -53,7 +53,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -61,7 +67,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -69,7 +81,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>

Modified: trunk/msautotest/wxs/expected/wcs_20_cap_accept_versions.xml
===================================================================
--- trunk/msautotest/wxs/expected/wcs_20_cap_accept_versions.xml	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/msautotest/wxs/expected/wcs_20_cap_accept_versions.xml	2011-05-19 10:03:39 UTC (rev 11726)
@@ -53,7 +53,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -61,7 +67,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -69,7 +81,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>

Modified: trunk/msautotest/wxs/expected/wcs_20_cap_sections_all.xml
===================================================================
--- trunk/msautotest/wxs/expected/wcs_20_cap_sections_all.xml	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/msautotest/wxs/expected/wcs_20_cap_sections_all.xml	2011-05-19 10:03:39 UTC (rev 11726)
@@ -53,7 +53,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -61,7 +67,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -69,7 +81,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>

Modified: trunk/msautotest/wxs/expected/wcs_20_cap_sections_all_specific.xml
===================================================================
--- trunk/msautotest/wxs/expected/wcs_20_cap_sections_all_specific.xml	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/msautotest/wxs/expected/wcs_20_cap_sections_all_specific.xml	2011-05-19 10:03:39 UTC (rev 11726)
@@ -53,7 +53,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -61,7 +67,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -69,7 +81,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>

Modified: trunk/msautotest/wxs/expected/wcs_20_cap_sections_operations_metadata.xml
===================================================================
--- trunk/msautotest/wxs/expected/wcs_20_cap_sections_operations_metadata.xml	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/msautotest/wxs/expected/wcs_20_cap_sections_operations_metadata.xml	2011-05-19 10:03:39 UTC (rev 11726)
@@ -5,7 +5,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -13,7 +19,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -21,7 +33,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>

Modified: trunk/msautotest/wxs/expected/wcs_20_cap_updatesequence.xml
===================================================================
--- trunk/msautotest/wxs/expected/wcs_20_cap_updatesequence.xml	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/msautotest/wxs/expected/wcs_20_cap_updatesequence.xml	2011-05-19 10:03:39 UTC (rev 11726)
@@ -53,7 +53,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -61,7 +67,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -69,7 +81,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>

Modified: trunk/msautotest/wxs/expected/wcs_20_post_cap.xml
===================================================================
--- trunk/msautotest/wxs/expected/wcs_20_post_cap.xml	2011-05-18 19:07:05 UTC (rev 11725)
+++ trunk/msautotest/wxs/expected/wcs_20_post_cap.xml	2011-05-19 10:03:39 UTC (rev 11726)
@@ -53,7 +53,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -61,7 +67,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>
@@ -69,7 +81,13 @@
       <ows:DCP>
         <ows:HTTP>
           <ows:Get xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
-          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?"/>
+          <ows:Post xlink:type="simple" xlink:href="http://devgeo.cciw.ca/cgi-bin/mapserv/ecows?">
+            <ows:Constraint name="PostEncoding">
+              <ows:AllowedValues>
+                <ows:Value>XML</ows:Value>
+              </ows:AllowedValues>
+            </ows:Constraint>
+          </ows:Post>
         </ows:HTTP>
       </ows:DCP>
     </ows:Operation>



More information about the mapserver-commits mailing list