[Geoserver-devel] [jira] Created: (GEOS-3415) The workspace specified in the URI gets ignored when creating coveragestores

The workspace specified in the URI gets ignored when creating coveragestores
----------------------------------------------------------------------------

                 Key: GEOS-3415
                 URL: http://jira.codehaus.org/browse/GEOS-3415
             Project: GeoServer
          Issue Type: Bug
          Components: REST
    Affects Versions: 2.0-RC1
         Environment: OpenSUSE 11, JVM 1.5.
            Reporter: Luca Morandini
            Assignee: Andrea Aime
            Priority: Minor

When I invoke the following (using WebTest, apologies for the verbose XML syntax):
         <invoke url="/rest/workspaces/cnmca/coveragestores" soapAction="true"
method="POST">
           <![CDATA[
             <coverageStore>
               <name>imgtest2</name>
               <enabled>true</enabled>
               <type>WorldImage</type>

<url>file:///usr/var/geoserver2_data_dir/coverages/img_sample/Pk50095.tif</url>
             </coverageStore>
           ]]>
         </invoke>

A coverage store is created under the it.geosolution workspace/namespace, though
"cncma" was specified in the URI.

But, when I add the workspace name in the POST content, the coverage store is
created under "cnmca":
         <invoke url="/rest/workspaces/cnmca/coveragestores" soapAction="true"
method="POST">
           <![CDATA[
             <coverageStore>
               <name>imgtest</name>
               <enabled>true</enabled>
               <workspace>
                  <name>cnmca</name>
               </workspace>
               <type>WorldImage</type>

<url>file:///usr/var/geoserver2_data_dir/coverages/img_sample/Pk50095.tif</url>
             </coverageStore>
           ]]>
         </invoke>

Finally, when I include in the POST content the workspace name of a workspace
different from the one specified in the URI, the latter gets ignored, and the
coverage store is created under "nurc".
         <invoke url="/rest/workspaces/cnmca/coveragestores" soapAction="true"
method="POST">
           <![CDATA[
             <coverageStore>
               <name>imgtest3</name>
               <enabled>true</enabled>
               <workspace>
                  <name>nurc</name>
               </workspace>
               <type>WorldImage</type>

<url>file:///usr/var/geoserver2_data_dir/coverages/img_sample/Pk50095.tif</url>
             </coverageStore>
           ]]>

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira