[mapguide-users] XML Parser error for Feature Sources

cagray colin.gray at 1spatial.com
Mon Dec 1 09:08:09 EST 2008


The error in the log is:

 Error: An exception occurred in the XML parser.
 StackTrace:
  - MgResourceServiceHandler.ProcessOperation line 80 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\ResourceServiceHandler.cpp
  - MgOpSetResource.Execute line 103 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\OpSetResource.cpp
  - MgServerResourceService.SetResource line 713 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\ServerResourceService.cpp
  - MgRepositoryManager.SetResource line 867 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\RepositoryManager.cpp
  - MgRepositoryManager.AddResource line 840 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\RepositoryManager.cpp
  - MgResourceContentManager.AddResource line 183 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\ResourceContentManager.cpp
  - MgResourceContentManager.PutDocument line 624 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\ResourceContentManager.cpp
  - MgResourceDefinitionManager.PutDocument line 554 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\ResourceDefinitionManager.cpp
  - MgResourceDefinitionManager.ValidateDocument line 429 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\ResourceDefinitionManager.cpp
  - MgResourceContentManager.ValidateDocument line 556 file
d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\server\src\services\resource\ResourceContentManager.cpp
An exception occurred in the XML parser.

However the MaestroAPI looks really good (think i was confusing MaestroAPI
with MapGuideAPI!). I'll have a go at that also.

Many thanks again
Colin


Kenneth Skovhede, GEOGRAF A/S wrote:
> 
> Yes, you can do just that.
> Look in the Maestro source code to see how it's done.
> The files "ResourceEditors/ResourceEditorBase.cs"  and 
> "ResourceEditors/ResourceEditorGeneric.cs" shows it.
> Some more customized versions are avalible in eg
> "FeatureSourceEditorSDF.cs"
> 
> Basically you can do:
>     MaestroAPI.ServerConnectionI con; //You must initialize this, see 
> the developer docs
>     MaestroAPI.FeatureSource fs = new MaestroAPI.FeatureSource();
>     fs.Provider = "OSGeo.SHP.3.1";
>     fs.Parameter["DefaultFilePath"] = "C:\my.shp";
>     con.SaveResourceAs(fs, new MaestroAPI.ResourceIdentifier("my fs", 
> OSGeo.MapGuide.MaestroAPI.ResourceTypes.FeatureSource));
> 
> 
> As for your actual problem, does the server error log show anything?
> C:\program files\Mapguideopensource2.0\server\logs\error.log
> 
> Regards, Kenneth Skovhede, GEOGRAF A/S
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XML-Parser-error-for-Feature-Sources-tp20770245p20772530.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list