Of course. The answer was when you are a posting a layer info object to the
rest endpoint you need to have all of your information "hanging" off the
layer keyword.

You need something like the following. https://gist.github.com/4125455

Other wise xstream attempts to marsh a data structure it does not
understand. Xstream must have an internal mapping that allows it to figure
out the layer keyword converts to a LayerInfo object.

Anyway, I am no expect so I should shut up.

Enjoy the week.


On Wed, Nov 21, 2012 at 3:05 AM, Russell Hore <[email protected]> wrote:

> Could you post the answer so we all know for the future.
>
> Russ
>
> On 21 Nov 2012, at 00:02, Ivan Willig <[email protected]> wrote:
>
> Never mind.. solved it.
>
>
> On Tue, Nov 20, 2012 at 4:59 PM, Ivan Willig <[email protected]> wrote:
>
>> Hi list,
>>
>> I am trying to use the geoserver rest api to update an layerobject info.
>> I am using GeoServer 2.2.1 on OpenJDK 1.7.
>>
>> I get this xstream exception, https://gist.github.com/4121489
>>
>> To reproduce this error please use this gist
>> https://gist.github.com/4121471 and the following curl command on the
>> default GeoServer data dir.
>>
>> curl -v -H "Content-Type: application/json" -X PUT --data "@states.json"
>> -u admin:geoserver http://localhost:8080/geoserver/rest/layers/states
>>
>> I figure that either I am doing something wrong or there is an issue in
>> the xstream json converter.
>>
>> Thanks.
>>
>> --
>>
>> Ivan Willig
>> OpenGeo - http://opengeo.org
>>
>>
>>
>
>
> --
>
> Ivan Willig
> OpenGeo - http://opengeo.org
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
>
> http://p.sf.net/sfu/zoho_dev2dev_nov_______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>


-- 

Ivan Willig
OpenGeo - http://opengeo.org
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to