<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
The output shown seems to be from EnumerateResources.<br>
There is no output from posting the Xml in the SetResource call,<br>
except perhaps an error message.<br>
<br>
I would like you to try posting the document using SetResource,<br>
and report the results.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
sekko970 skrev:
<blockquote cite="mid:1236249835605-2428613.post@n2.nabble.com"
 type="cite">
  <pre wrap="">This is the result of posting:

  &lt;?xml version="1.0" encoding="UTF-8" ?&gt; 
- &lt;ResourceList xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:noNamespaceSchemaLocation="ResourceList-1.0.0.xsd"&gt;
- &lt;ResourceDocument&gt;
  &lt;ResourceId&gt;Library://MyApp/AppLayouts/MyLayout.WebLayout&lt;/ResourceId&gt; 
  &lt;Depth&gt;3&lt;/Depth&gt; 
  &lt;Owner&gt;Administrator&lt;/Owner&gt; 
  &lt;CreatedDate&gt;2009-03-04T15:50:26Z&lt;/CreatedDate&gt; 
  &lt;ModifiedDate&gt;2009-03-04T17:02:27Z&lt;/ModifiedDate&gt; 
- &lt;ResourceDocumentHeader
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:noNamespaceSchemaLocation="ResourceDocumentHeader-1.0.0.xsd"&gt;
- &lt;Security xsi:noNamespaceSchemaLocation="ResourceSecurity-1.0.0.xsd"&gt;
  &lt;Inherited&gt;true&lt;/Inherited&gt; 
- &lt;Groups&gt;
- &lt;Group&gt;
  &lt;Name&gt;Everyone&lt;/Name&gt; 
  &lt;Permissions&gt;r,w&lt;/Permissions&gt; 
  &lt;/Group&gt;
  &lt;/Groups&gt;
  &lt;/Security&gt;
  &lt;/ResourceDocumentHeader&gt;
  &lt;/ResourceDocument&gt;
  &lt;/ResourceList&gt;

I also found that the error is originated if the XML has nodes like
&lt;Function&gt;Command&lt;/Function&gt;; if the XML has nodes like
&lt;Function&gt;Separator&lt;/Function&gt;, there aren't errors.


Fabio

------------------------------------------------------------------------------------------------------


Kenneth Skovhede, GEOGRAF A/S wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Have you tried posting the document to the webform?
<a class="moz-txt-link-freetext" href="http://localhost/mapguide/mapagent/index.html">http://localhost/mapguide/mapagent/index.html</a>

Regards, Kenneth Skovhede, GEOGRAF A/S



sekko970 skrev:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Dear all,
I just found the cause of my problem.

My web-layout xml template is a copy of a new layout XML structure
created
from MGMaestro:

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;WebLayout xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xmlns:xsd=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema">"http://www.w3.org/2001/XMLSchema"</a>
xsi:noNamespaceSchemaLocation="WebLayout-1.0.0.xsd"&gt;
        &lt;Title&gt;MyMapTitle&lt;/Title&gt;
        &lt;Map&gt;
                &lt;ResourceId&gt;MyMap.MapDefinition&lt;/ResourceId&gt;
                &lt;HyperlinkTarget&gt;TaskPane&lt;/HyperlinkTarget&gt;
        &lt;/Map&gt;
        &lt;ToolBar&gt;
                &lt;Visible&gt;true&lt;/Visible&gt;
                &lt;Button xsi:type="CommandItemType"&gt;
                        &lt;Function&gt;Command&lt;/Function&gt;
                        &lt;Command&gt;Print&lt;/Command&gt;
                &lt;/Button&gt;
                          .............
        &lt;/ToolBar&gt;
        &lt;InformationPane&gt;
                &lt;Visible&gt;true&lt;/Visible&gt;
                &lt;Width&gt;200&lt;/Width&gt;
                &lt;LegendVisible&gt;true&lt;/LegendVisible&gt;
                &lt;PropertiesVisible&gt;true&lt;/PropertiesVisible&gt;
        &lt;/InformationPane&gt;
        &lt;ContextMenu&gt;
                &lt;Visible&gt;true&lt;/Visible&gt;
                &lt;MenuItem xsi:type="CommandItemType"&gt;
                        &lt;Function&gt;Command&lt;/Function&gt;
                        &lt;Command&gt;Select&lt;/Command&gt;
                &lt;/MenuItem&gt;
                         .............
        &lt;/ContextMenu&gt;
        &lt;TaskPane&gt;
                &lt;Visible&gt;true&lt;/Visible&gt;
                &lt;Width&gt;280&lt;/Width&gt;
                &lt;TaskBar&gt;
                        &lt;Visible&gt;true&lt;/Visible&gt;
                        &lt;Home&gt;
                                &lt;Name&gt;Home&lt;/Name&gt;
                                &lt;Tooltip&gt;Return to home task page&lt;/Tooltip&gt;
                                &lt;Description&gt;Return to home task page&lt;/Description&gt;
                                &lt;ImageURL&gt;../stdicons/icon_home.gif&lt;/ImageURL&gt;
                        
&lt;DisabledImageURL&gt;../stdicons/icon_home_disabled.gif&lt;/DisabledImageURL&gt;
                        &lt;/Home&gt;
                        &lt;Forward&gt;
                                &lt;Name&gt;Forward&lt;/Name&gt;
                                &lt;Tooltip&gt;Forward to next task page&lt;/Tooltip&gt;
                                &lt;Description&gt;Forward to next task page&lt;/Description&gt;
                                &lt;ImageURL&gt;../stdicons/icon_forward.gif&lt;/ImageURL&gt;
                        
&lt;DisabledImageURL&gt;../stdicons/icon_forward_disabled.gif&lt;/DisabledImageURL&gt;
                        &lt;/Forward&gt;
                        &lt;Back&gt;
                                &lt;Name&gt;Back&lt;/Name&gt;
                                &lt;Tooltip&gt;Return to previous task page&lt;/Tooltip&gt;
                                &lt;Description&gt;Return to previous task page&lt;/Description&gt;
                                &lt;ImageURL&gt;../stdicons/icon_back.gif&lt;/ImageURL&gt;
                        
&lt;DisabledImageURL&gt;../stdicons/icon_back_disabled.gif&lt;/DisabledImageURL&gt;
                        &lt;/Back&gt;
                        &lt;Tasks&gt;
                                &lt;Name&gt;Tasks&lt;/Name&gt;
                                &lt;Tooltip&gt;Task list&lt;/Tooltip&gt;
                                &lt;Description&gt;View a list of available tasks&lt;/Description&gt;
                                &lt;ImageURL&gt;../stdicons/icon_tasks.gif&lt;/ImageURL&gt;
                        
&lt;DisabledImageURL&gt;../stdicons/icon_tasks_disabled.gif&lt;/DisabledImageURL&gt;
                        &lt;/Tasks&gt;
                        &lt;MenuButton xsi:type="CommandItemType"&gt;
                                &lt;Function&gt;Command&lt;/Function&gt;
                                &lt;Command&gt;Measure&lt;/Command&gt;
                        &lt;/MenuButton&gt;
                                      .............
                &lt;/TaskBar&gt;
        &lt;/TaskPane&gt;
        &lt;StatusBar&gt;
                &lt;Visible&gt;true&lt;/Visible&gt;
        &lt;/StatusBar&gt;
        &lt;ZoomControl&gt;
                &lt;Visible&gt;true&lt;/Visible&gt;
        &lt;/ZoomControl&gt;
        &lt;CommandSet&gt;
                &lt;Command xsi:type="BasicCommandType"&gt;
                        &lt;Name&gt;Pan&lt;/Name&gt;
                        &lt;Label&gt;Pan&lt;/Label&gt;
                        &lt;Tooltip&gt;Pan mode&lt;/Tooltip&gt;
                        &lt;Description&gt;Drag the map to view areas out of range&lt;/Description&gt;
                        &lt;ImageURL&gt;../stdicons/icon_pan.gif&lt;/ImageURL&gt;
                        &lt;DisabledImageURL&gt;../stdicons/icon_pan_disabled.gif&lt;/DisabledImageURL&gt;
                        &lt;TargetViewer&gt;All&lt;/TargetViewer&gt;
                        &lt;Action&gt;Pan&lt;/Action&gt;
                &lt;/Command&gt;
                          .............
        &lt;/CommandSet&gt;
&lt;/WebLayout&gt;


If the XML layout definition contains a &lt;button&gt; node chilld of &lt;toolbar&gt;
node, or a &lt;MenuItem&gt; node chilld of &lt;ContextMenu&gt; node, or a
&lt;MenuButton&gt;
chilld of &lt;TaskPane&gt;&lt;TaskBar&gt; node, or a &lt;Command&gt; node chilld of
&lt;CommandSet&gt; node, it is generated the following error:

The type 'OSGeo.MapGuide.MgNullArgumentException' nell'assembly
'MapGuideDotNetApi, Version = 2.0.2.3011, Culture = neutral,
PublicKeyToken
= null' is not marked as serializable.


How can I fix it?
Thanks in advance.
Fabio


------------------------------------------------------------------------------------------------------


Kenneth Skovhede, GEOGRAF A/S wrote:
  
      </pre>
      <blockquote type="cite">
        <pre wrap="">There are/were problems reading data using the MgByteReader, as it would 
not return more than 8K.
You are using the native API, which, IMO, has some quirks.
Maestro uses the http interface to store the file, so that is equivalent 
to posting using the webform.

Regards, Kenneth Skovhede, GEOGRAF A/S



sekko970 skrev:
    
        </pre>
        <blockquote type="cite">
          <pre wrap="">The file is 21K.
I tryed also to load it directly from Maestro, and I have had no
problem.

------------------------------------------------------------------------------------------------------


Kenneth Skovhede, GEOGRAF A/S wrote:
  
      
          </pre>
          <blockquote type="cite">
            <pre wrap="">Just to be sure...

The xml you posted is the ResourceHeader, and not the ResourceContent, 
so it does not really show what the problem may be.
The error from the log states that the runtime map is not created,
which 
is strange because a WebLayout cannot reference a runtime map.
The other error you posted seemed to indicate that the Print command
was 
invalid inside the WebLayout.

Can you try so save the xml, just before you write it to the
MgByteStream?
Then try to post the file, using the SetResource in the webform 
mentioned earlier.
If you get the same error, try to post the file somewhere, and provide

link.
Be carefull not to copy/paste, but post the actual file.

Btw. how large is the file? larger than 8K?

Regards, Kenneth Skovhede, GEOGRAF A/S



_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    
        
            </pre>
          </blockquote>
          <pre wrap="">  
      
          </pre>
        </blockquote>
        <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    
        </pre>
      </blockquote>
      <pre wrap="">  
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>