[mapguide-users] Enumerating resources from Session repository

Kenneth, GEOGRAF A/S ks at geograf.dk
Mon Nov 19 07:51:54 EST 2007


This has been discussed on the internals list:
http://trac.osgeo.org/mapguide/ticket/168

Currently it is not supported and probably will not be supported.

The session repository only contains items that has been placed there 
explicitly.
If you save a layer there, you can read it, but there are no copies of 
layers from the Library.

This means that you have to keep a list of all items you place there.
If you are looking for the runtime map, it is saved as "Session:" + 
sessionid + "//" + mapname + ".Map".
It is a dummy Xml, but it has ResourceData with binary representaions of 
the Xml and MapDefinition.

Anything other than the RuntimeMap can be saved in the Library if you 
want to explore it.

Regards, Kenneth, GEOGRAF A/S



Maksim Sestic skrev:
> Is it possible to enumerate resources from a Session-based repository, using
> MgServerResourceService.EnumerateResources() method? 
>
> I guess not (ServerResourceService.cpp):
>
> if (!resource->IsRepositoryTypeOf(MgRepositoryType::Library))
>     {
>         throw new MgInvalidRepositoryTypeException(
>             L"MgServerResourceService.EnumerateResources",
>             __LINE__, __WFILE__, NULL, L"", NULL);
>     }
>
> I need to enumerate available resources found within a Session, still have
> no clue how to browse down the session repository. In my understanding, each
> session carries actual instances of library repository definitions
> (objects). So I should be able to browse them then. I guess I'm missing
> something here :-)
>
> Regards,
> Maksim Sestic
>
>
>   


More information about the mapguide-users mailing list