[mapguide-users] Modify mapdefinition in a layout

euskalmap ziburudebian at free.fr
Fri Mar 27 12:04:33 EDT 2009


Hi,
Effectifly i have send bad tests. Sorry !!
You can see the new files here : http://patxi.mayol.free.fr/test_before.xml  and http://patxi.mayol.free.fr/test_after.xml 

So I do another test in my aspx file : http://patxi.mayol.free.fr/sample4.asp 

With defaultUser="Anonymous" and defaultPassword="" :
*If I comment the line 69 (webLayoutId = new MgResourceIdentifier(str_NewMapDefinition)) I have this message : 'Unauthorized access.'
*If I uncomment the same line I have this mesage : 'Permission denied to resource: Session:bfba102a-ffff-ffff-8000-0016d44491c1_en_7F0000010AFC0AFB0AFA//Map_40312.MapDefinition'

With defaultUser="Administrator" and defaultPassword="admin" : (default value of MapguideOSE administrator)
*If I comment the line 69 : 'An exception occurred in DB XML component. Error: XML Indexer: Fatal Parse error in document at line, 1, char 1. Parser message: Invalid document structure '
*If I uncomment the same line I have the same message error mesage.

It seems there is perhaps a problem with the right authorization ant the method I use to init siteconnection ?

Perhaps this new information is interesting for you ?

Regards,
Francis


Not sure why, but both of those files have the UTF-8 BOM header :(.

Regards, Kenneth Skovhede, GEOGRAF A/S



euskalmap skrev:
> Hi,
> Yes, the browser can read the xml file : i have generate 2 files : one just after reading the doc ( http://patxi.mayol.free.fr/test_before.xml ) and another one after modify the Map id ( http://patxi.mayol.free.fr/test_after.xml ) : the 2 files an be reading in my browser .
> You can see my code here : http://patxi.mayol.free.fr/sample3.asp 
> regards
>
> Even if you don't have any xsd files in c:\temp, you should be able to 
> open the xml document using Internet Explorer (just drag it into it).
>
> Have you tried to not change the xml, and just save it back to MapGuide 
> after reading it?
> (In your code, just comment out the part that writes the new Map id into 
> the xml.)
>
> Regards, Kenneth Skovhede, GEOGRAF A/S
>
>
>
> euskalmap skrev:
>   
>> HI,
>>
>> Yes i have the file WebLayout-1.0.0.xsd in the directory C:\Program Files\MapGuideOpenSource2.0\Server\Schema\.
>> which method you want that I use to save the weblayout ?
>> If i save the weblayout in my code with the instruction ,
>> FileStream fs = File.Create("c:\\temp\\test.xml");
>> fs.Write(encodedBytes, 0, encodedBytes.Length);
>> it is normal that i can not read the weblayout because the file WebLayout-1.0.0.xsd is not present in c:\temp directory.
>> I have not understand how saving and reading the weblayout ?
>> Other question : Perhaps my mapguide server is not correctly parameterized? 
>> Thanks for your lelp.
>>
>>
>> Yes, it is very strange that it happens with only weblayouts.
>> Do you have the file:
>> C:\Program Files\MapGuideOpenSource2.0\Server\Schema\WebLayout-1.0.0.xsd
>>
>> Can you save the weblayout if you just read it, and then save it? (eg. 
>> not changing anything).
>>
>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>
>>
>>
>> euskalmap skrev:
>>   
>>     
>>> Hi,
>>> I have try your maestro class in my sample like this : 
>>> http://patxi.mayol.free.fr/sample2.asp
>>> http://patxi.mayol.free.fr/sample2.asp 
>>> I have always the same error.
>>> In the mapguide log file it say 'An exception occurred in the XML parser.'
>>> and at the end i say about an error in
>>> MgResourceContentManager.ValidateDocument.
>>> Perhaps, Mapguide server can not find the WebLayout.1.0.0.xsd file ?
>>> What you think about it?.
>>> NB:It is very strange that there is no problem with filter in layer and as
>>> much problem to modify mapdefinition in layout !!!
>>>
>>> Thanks
>>>
>>>
>>>   
>>>     
>>>       
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>
>>   
>>     
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
>
>
>   

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users



-- 
View this message in context: http://n2.nabble.com/Modify-mapdefinition-in-a-layout-tp2462320p2545066.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list