[mapguide-trac] #649: FeatureService.UpdateFeatures doesn't log errors and reports them as succesful

MapGuide Open Source trac_mapguide at osgeo.org
Sun Mar 1 13:40:10 EST 2009


#649: FeatureService.UpdateFeatures doesn't log errors and reports them as
succesful
-----------------------------+----------------------------------------------
 Reporter:  zspitzer         |         Owner:       
     Type:  defect           |        Status:  new  
 Priority:  medium           |     Milestone:       
Component:  Feature Service  |       Version:  2.0.2
 Severity:  critical         |    Resolution:       
 Keywords:                   |   External_id:       
-----------------------------+----------------------------------------------
Comment (by milicevic):

 Hello,

 i wolud like to report the same behaviour on deleting features. In fact, I
 don't get it, the code looks and works well, class name is just fine,
 filter condition also but no errors or exceptions has been thrown.


 {{{
         string TIMgisUser =
 System.Configuration.ConfigurationManager.AppSettings["TIMgisUser"];
         MapGuideApi.MgInitializeWebTier(@"C:\program
 files\MapguideOpenSource2.0\WebServerExtensions\www\webconfig.ini");
         MgUserInformation userInfo = new
 MgUserInformation("Administrator", "" +
 System.Configuration.ConfigurationManager.AppSettings["mgP"] + "");
         MgSite site = new MgSite();
         site.Open(userInfo);
         String mgSessionId = site.CreateSession();

         MgUserInformation userInfoNew = new
 MgUserInformation(mgSessionId);
         MgSiteConnection siteConnection = new MgSiteConnection();
         siteConnection.Open(userInfoNew);

         MgResourceService resourceService =
 siteConnection.CreateService(MgServiceType.ResourceService) as
 MgResourceService;
         MgFeatureService featureService =
 siteConnection.CreateService(MgServiceType.FeatureService) as
 MgFeatureService;

         MgResourceIdentifier resId = new
 MgResourceIdentifier("Library://PROJEKTI/ZLZ/PODACI/DIONICE.FeatureSource");
         MgFeatureCommandCollection commands = new
 MgFeatureCommandCollection();

         string layerClassName = "DIONICE";

         MgDeleteFeatures deleteCmd = new MgDeleteFeatures(layerClassName ,
 "(FeatId=1)");
         commands.Add(deleteCmd);

         featureService.UpdateFeatures(resId, commands, false);
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/649#comment:4>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list