[OpenLayers-Users] WFS-T update problem with namespaces

Christopher Schmidt crschmidt at metacarta.com
Wed Jun 4 14:18:24 EDT 2008


On Wed, Jun 04, 2008 at 08:09:24PM +0200, Andrea Aime wrote:
> Yeah, the error comes up from Xerces-J during the xml validation, it
> should be something like the following (I used another layer):
> 
> Invalid request
> UndeclaredPrefix: Cannot resolve 'topp:tasmania_roads' as a QName: the 
> prefix 'topp' is not declared.
> cvc-attribute.3: The value 'topp:tasmania_roads' of attribute 'typeName' 
> on element 'wfs:Update' is not valid with respect to its type.
> 
> The problem is that typeName is an xs:QName, and its namespace must
> be declared in order for the XML to be schema compliant.

You've got to be kidding me. I don't even know if there's a way to *do*
this in any of the OpenLayers code: I don't think the browser DOM
neccesarily has a way to add namespaces which aren't actually used in
the XML... Tim would probably know more. (I know I can't do it from my
Python XML parser/creator, but that's obviously a slightly different
case.)

> I believe you'll need to open a ticket with OL. In the meantime, the way
> to make the request work anyways, is to disable XML validation in
> GeoServer: disable "strict cite compliance" in wfs configuraton or
> post your requests to http://host:port/geoserver/wfs?strict=false

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list