Hi Denis, I also use REST but without curl, I developed a java client.

My procedure is the following.

Configure whatever you need on the admin GUI and check your  
configuration using the geoserver preview. (openlayers).

If anything works,  examine the GESORVER_DATA_DIR and use the newly  
created xml config files as a template.

Until now, I had no problems. (But I am on trunk).

Cheers
Christian




Quoting Dennis Hesse BAW <[email protected]>:

> Hi list,
>
> it's me once again.
>
> For now I upgraded to 2.1 RC5, and the same error accurs.
>
> Anyone has a clue for that?
>
> Thank you
> Dennis.
>
> 2011/4/21 Dennis Hesse BAW <[email protected]>
>
>> Hmm... still not at the goal ...
>>
>> I had several looks at the REST Interface, but I don't really find the way
>> to go.
>>
>> my code is
>>
>> curl -u admin:geoserver -XPOST -H 'Content-type: text/xml' \
>>       -d '<featureType><name>$line</name></featureType>' \
>>
>> http://127.0.0.1:7070/geoserver/rest/workspaces/$workspace/datastores/$dsname/featuretypes
>>
>> and I get the following error:
>>
>> Trying to create new feature type inside the store, but no attributes were
>> specified
>>
>> Besides I tried to change the style of an already published layer with the
>> following code:
>>
>> curl -u admin:geoserver -XPUT -H "Content-type: text/xml" \
>>   -d
>> '<layer><defaultStyle><name>SchwebstoffGehalt</name></defaultStyle></layer>'
>> \
>>   http://kfki:7070/geoserver/rest/layers/dennis:schwstgh_00-00-00_utc
>>
>> It returns no error, all works well in the command line, but when trying to
>> get the layer in the browser, I get the following error:
>>
>> Internal error featureType: dennis:schwstgh_00-00-00_utc does not have a
>> properly configured datastore
>>
>> I found an IRC-log of Andrea, http://irc.geoserver.org/log/2010/05/17/, in
>> which this error accured, but I cant find out where I shoul add the
>>
>> <enabled>true</enabled>
>>
>> Can you help me with that?
>>
>> The SLD I'm using is
>>
>> <?xml version="1.0" encoding="windows-1252"?>
>> <sld:UserStyle xmlns="http://www.opengis.net/sld"; xmlns:sld="
>> http://www.opengis.net/sld"; xmlns:ogc="http://www.opengis.net/ogc";
>> xmlns:gml="http://www.opengis.net/gml";>
>>   <sld:Name>AtlasStyler v1.6-r201101191752</sld:Name>
>>   <sld:Title/>
>>   <sld:FeatureTypeStyle>
>>
>> <sld:Name>QUANTITIES_COLORIZED_POLYGON:VALUE#schwstgh_v:NORM#null:METHOD#QUANTILES:PALETTE#RdBu</sld:Name>
>>
>>     <sld:Rule>
>>       <sld:Name>AS: 1/7 GraduatedColorPolygonRuleList</sld:Name>
>>       <sld:Title>[-99999999,990 - 0,000[</sld:Title>
>>       <ogc:Filter>
>>         <ogc:And>
>>           <ogc:Not>
>>             <ogc:PropertyIsNull>
>>               <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             </ogc:PropertyIsNull>
>>           </ogc:Not>
>>           <ogc:PropertyIsBetween>
>>             <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             <ogc:LowerBoundary>
>>               <ogc:Literal>-9.999999999E7</ogc:Literal>
>>             </ogc:LowerBoundary>
>>             <ogc:UpperBoundary>
>>               <ogc:Literal>2.12016285401E-15</ogc:Literal>
>>             </ogc:UpperBoundary>
>>           </ogc:PropertyIsBetween>
>>         </ogc:And>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#2166AC</sld:CssParameter>
>>         </sld:Fill>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>     <sld:Rule>
>>       <sld:Name>AS: 2/7 GraduatedColorPolygonRuleList</sld:Name>
>>       <sld:Title>[0,000 - 0,001[</sld:Title>
>>       <ogc:Filter>
>>         <ogc:And>
>>           <ogc:Not>
>>             <ogc:PropertyIsNull>
>>               <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             </ogc:PropertyIsNull>
>>           </ogc:Not>
>>           <ogc:PropertyIsBetween>
>>             <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             <ogc:LowerBoundary>
>>               <ogc:Literal>2.12016285401E-15</ogc:Literal>
>>             </ogc:LowerBoundary>
>>             <ogc:UpperBoundary>
>>               <ogc:Literal>6.657885005550001E-4</ogc:Literal>
>>             </ogc:UpperBoundary>
>>           </ogc:PropertyIsBetween>
>>         </ogc:And>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#67A9CF</sld:CssParameter>
>>         </sld:Fill>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>     <sld:Rule>
>>       <sld:Name>AS: 3/7 GraduatedColorPolygonRuleList</sld:Name>
>>       <sld:Title>[0,001 - 0,008[</sld:Title>
>>       <ogc:Filter>
>>         <ogc:And>
>>           <ogc:Not>
>>             <ogc:PropertyIsNull>
>>               <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             </ogc:PropertyIsNull>
>>           </ogc:Not>
>>           <ogc:PropertyIsBetween>
>>             <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             <ogc:LowerBoundary>
>>               <ogc:Literal>6.657885005550001E-4</ogc:Literal>
>>             </ogc:LowerBoundary>
>>             <ogc:UpperBoundary>
>>               <ogc:Literal>0.00818227759252</ogc:Literal>
>>             </ogc:UpperBoundary>
>>           </ogc:PropertyIsBetween>
>>         </ogc:And>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#D1E5F0</sld:CssParameter>
>>         </sld:Fill>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>     <sld:Rule>
>>       <sld:Name>AS: 4/7 GraduatedColorPolygonRuleList</sld:Name>
>>       <sld:Title>[0,008 - 0,029[</sld:Title>
>>       <ogc:Filter>
>>         <ogc:And>
>>           <ogc:Not>
>>             <ogc:PropertyIsNull>
>>               <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             </ogc:PropertyIsNull>
>>           </ogc:Not>
>>           <ogc:PropertyIsBetween>
>>             <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             <ogc:LowerBoundary>
>>               <ogc:Literal>0.00818227759252</ogc:Literal>
>>             </ogc:LowerBoundary>
>>             <ogc:UpperBoundary>
>>               <ogc:Literal>0.029380128951749997</ogc:Literal>
>>             </ogc:UpperBoundary>
>>           </ogc:PropertyIsBetween>
>>         </ogc:And>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#F7F7F7</sld:CssParameter>
>>         </sld:Fill>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>     <sld:Rule>
>>       <sld:Name>AS: 5/7 GraduatedColorPolygonRuleList</sld:Name>
>>       <sld:Title>[0,029 - 0,095[</sld:Title>
>>       <ogc:Filter>
>>         <ogc:And>
>>           <ogc:Not>
>>             <ogc:PropertyIsNull>
>>               <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             </ogc:PropertyIsNull>
>>           </ogc:Not>
>>           <ogc:PropertyIsBetween>
>>             <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             <ogc:LowerBoundary>
>>               <ogc:Literal>0.029380128951749997</ogc:Literal>
>>             </ogc:LowerBoundary>
>>             <ogc:UpperBoundary>
>>               <ogc:Literal>0.09468075384694999</ogc:Literal>
>>             </ogc:UpperBoundary>
>>           </ogc:PropertyIsBetween>
>>         </ogc:And>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#FDDBC7</sld:CssParameter>
>>         </sld:Fill>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>     <sld:Rule>
>>       <sld:Name>AS: 6/7 GraduatedColorPolygonRuleList</sld:Name>
>>       <sld:Title>[0,095 - 0,300[</sld:Title>
>>       <ogc:Filter>
>>         <ogc:And>
>>           <ogc:Not>
>>             <ogc:PropertyIsNull>
>>               <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             </ogc:PropertyIsNull>
>>           </ogc:Not>
>>           <ogc:PropertyIsBetween>
>>             <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             <ogc:LowerBoundary>
>>               <ogc:Literal>0.09468075384694999</ogc:Literal>
>>             </ogc:LowerBoundary>
>>             <ogc:UpperBoundary>
>>               <ogc:Literal>0.300025290809375</ogc:Literal>
>>             </ogc:UpperBoundary>
>>           </ogc:PropertyIsBetween>
>>         </ogc:And>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#EF8A62</sld:CssParameter>
>>         </sld:Fill>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>     <sld:Rule>
>>       <sld:Name>AS: 7/7 GraduatedColorPolygonRuleList</sld:Name>
>>       <sld:Title>[0,300 - 0,839]</sld:Title>
>>       <ogc:Filter>
>>         <ogc:And>
>>           <ogc:Not>
>>             <ogc:PropertyIsNull>
>>               <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             </ogc:PropertyIsNull>
>>           </ogc:Not>
>>           <ogc:PropertyIsBetween>
>>             <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>             <ogc:LowerBoundary>
>>               <ogc:Literal>0.300025290809375</ogc:Literal>
>>             </ogc:LowerBoundary>
>>             <ogc:UpperBoundary>
>>               <ogc:Literal>0.838502421975</ogc:Literal>
>>             </ogc:UpperBoundary>
>>           </ogc:PropertyIsBetween>
>>         </ogc:And>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#B2182B</sld:CssParameter>
>>         </sld:Fill>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>     <sld:Rule>
>>       <sld:Name>NODATA_RULE</sld:Name>
>>       <sld:Title>k.A.</sld:Title>
>>       <ogc:Filter>
>>         <ogc:PropertyIsNull>
>>           <ogc:PropertyName>schwstgh_v</ogc:PropertyName>
>>         </ogc:PropertyIsNull>
>>       </ogc:Filter>
>>       <sld:MinScaleDenominator>4.9E-324</sld:MinScaleDenominator>
>>
>> <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
>>       <sld:PolygonSymbolizer>
>>         <sld:Geometry>
>>           <ogc:PropertyName>the_geom</ogc:PropertyName>
>>         </sld:Geometry>
>>         <sld:Fill>
>>           <sld:CssParameter name="fill">#FFFFFF</sld:CssParameter>
>>         </sld:Fill>
>>         <sld:Stroke>
>>           <sld:CssParameter name="stroke">#C0C0C0</sld:CssParameter>
>>         </sld:Stroke>
>>       </sld:PolygonSymbolizer>
>>     </sld:Rule>
>>   </sld:FeatureTypeStyle>
>>
>> </sld:UserStyle>
>>
>> Thanks for your help
>> Dennis.
>>
>> 2011/4/21 Miles Jordan <[email protected]>
>>
>>> teehee. best clear this one up, I think Andrea read it too quickly (trying
>>> to get to his easter eggs sooner perhaps ;)
>>>
>>> Dennis, everything that you want to do can be done with the REST
>>> interface. The documentation is at
>>> http://docs.geoserver.org/2.0.0/user/extensions/rest/index.html (or by
>>> googling "geoserver rest" :)
>>>
>>> I think you need two requests to publish a layer and change the style.
>>> It's all there though. It works well. Let us know how you go.
>>>
>>> Cheers
>>>
>>> Miles
>>>
>>>
>>> ________________________________________
>>> From: Andrea Aime [[email protected]]
>>> Sent: Thursday, 21 April 2011 5:44 PM
>>> To: Dennis Hesse BAW
>>> Cc: [email protected]
>>> Subject: Re: [Geoserver-users] how to publish post-gis layers?
>>> [SEC=Unclassified]
>>>
>>> On Thu, Apr 21, 2011 at 9:08 AM, Dennis Hesse BAW <[email protected]>
>>> wrote:
>>> > Hi once again,
>>> >
>>> > no one here who can help me or tell me thet there's just no way to do it
>>> > without mouse-movement? ;)
>>>
>>> You're asking on the wrong mailing list, mouse-movement is handled in
>>> the client.
>>> Maybe ask on OpenLayers?
>>>
>>> Cheers
>>> Andrea
>>>
>>>
>>> --
>>> -------------------------------------------------------
>>> Ing. Andrea Aime
>>> GeoSolutions S.A.S.
>>> Tech lead
>>>
>>> Via Poggio alle Viti 1187
>>> 55054  Massarosa (LU)
>>> Italy
>>>
>>> phone: +39 0584 962313
>>> fax:      +39 0584 962313
>>>
>>> http://www.geo-solutions.it
>>> http://geo-solutions.blogspot.com/
>>> http://www.youtube.com/user/GeoSolutionsIT
>>> http://www.linkedin.com/in/andreaaime
>>> http://twitter.com/geowolf
>>>
>>> -------------------------------------------------------
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Benefiting from Server Virtualization: Beyond Initial Workload
>>> Consolidation -- Increasing the use of server virtualization is a top
>>> priority.Virtualization can reduce costs, simplify management, and improve
>>> application availability and disaster protection. Learn more about
>>> boosting
>>> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
>>> _______________________________________________
>>> Geoserver-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>> ___________________________________________________________________________
>>>
>>>    Australian Antarctic Division - Commonwealth of Australia
>>> IMPORTANT: This transmission is intended for the addressee only. If you
>>> are not the
>>> intended recipient, you are notified that use or dissemination of this
>>> communication is
>>> strictly prohibited by Commonwealth law. If you have received this
>>> transmission in error,
>>> please notify the sender immediately by e-mail or by telephoning +61 3
>>> 6232 3209 and
>>> DELETE the message.
>>>        Visit our web site at http://www.antarctica.gov.au/
>>>
>>> ___________________________________________________________________________
>>>
>>
>>
>>
>> --
>>
>> Dennis Hesse
>> Bundesanstalt für Wasserbau Dienststelle Hamburg
>> Wedeler Landstraße 157 22559 Hamburg
>>
>> Tel.: 040 81908-0 E-mail: [email protected]
>> Webseiten: BAW <http://www.baw.de/de/index.php.html>  ||   
>> MDI-DE<http://www.mdi-de.org/>
>>
>>
>>
>
>
> --
>
> Dennis Hesse
> Bundesanstalt für Wasserbau Dienststelle Hamburg
> Wedeler Landstraße 157 22559 Hamburg
> Tel.: 040 81908-0 E-mail: [email protected]
> Webseiten: BAW <http://www.baw.de/de/index.php.html>  ||
> MDI-DE<http://www.mdi-de.org/>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to