[mapguide-internals] does the featureService setResource method do full xml validation?

Zac Spitzer zac.spitzer at gmail.com
Thu May 24 06:09:36 EDT 2007


Just found that an invalid (ie non-existant) featurename in a
LayerDefinition can be passed which also throws the same error in the
logs.

On 5/24/07, Kenneth, GEOGRAF A/S <ks at geograf.dk> wrote:
> Based on my experience, it only validates using XSD, and there may be
> cases that are not trapped by the XSD.
> I've seen some cases where the upload works fine, but the server crashes
> or is unable to display the map.
> I can't get it to display xml that is not UTF-8 encoded, even with a
> valid encoding header, but upload works fine.
>
> Also, MapGuide Studio requires spaces (linefeeds?) between tags.
>
> Regards, GEOGRAF A/S
>
>
>
> zspitzer wrote:
> > I have been playing with creating creating some resources with SetResource.
> > It seems i can pass XML which causes server crashes.
> >
> > for example not having     <VectorScaleRange>.....</VectorScaleRange> in a
> > layer definition for example throws
> >
> >       An exception occurred in DB XML component. Error: XML Indexer: Parse error
> > in document at line, 9, char 28. Parser message: Not enough elements to
> > match content model :
> > '(ResourceId,Opacity,(FeatureName,FeatureNameType,Filter,PropertyMapping,Geometry,Url,ToolTip,VectorScaleRange),ExtendedData1)'
> >
> > however  having an empty <VectorScaleRange></VectorScaleRange> ie no styling
> > or scale ranges
> >
> > will case a runtime error and a console dialog on xp.
> >
> > the following is listed in the logs
> >
> >   - MgStylizationUtil.StylizeLayers line 923 file
> > c:\build_bond_area\mapguide_open_source_v1.2\build_13.7\mgdev\server\src\services\mapping\StylizationUtil.cpp
> > Failed to stylize layer: Datasets_ABORIG_NT
> >
> > I have also experienced crashes which return a 500 server error with
> > incorrect xml for resources which were successfully uploaded via SetResource
> >
> >
> >
> >
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>


-- 
Zac Spitzer
http://zacster.blogspot.com/
+61 405 847 168


More information about the mapguide-internals mailing list