<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Manel,<br>
I have used MapGuide Studio 2008 to create this feature source. <br>
Perhaps Kenneth can answer if this is a bug, or there is something
extra to be done in setting the feature source.<br>
I have the same version of Maestro as yours.<br>
<br>
Stefan Dalakov<br>
<br>
Manel Gimeno wrote:
<blockquote cite="mid:235AC4356E014F22A694EBC7F6DC9643@SOFTIMIZA.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.6000.16809" name="GENERATOR">
<style></style>
<div><font face="Arial" size="2">Thanks Stefan.</font></div>
<div> </div>
<div><font face="Arial" size="2">I copy and paste directly your XML
(changing name, password,...) in Mapguide Maestro XML editor and it
works fine. </font></div>
<div> </div>
<div><font face="Arial" size="2">But as you said the server name
appears under "Database" while "server" and "port" fields remain empty
in Mapguide Maestro.</font></div>
<div> </div>
<div><font face="Arial" size="2">Using directly Mapguide Maestro the
XML generated is:</font></div>
<div> </div>
<div><font face="Arial" size="2"><?xml version="1.0"
encoding="utf-8"?><br>
<FeatureSource xmlns:xsi="<a moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"
xmlns:xsd="<a moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"
xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd"><br>
<Provider>OSGeo.MySQL</Provider><br>
<Parameter><br>
<Name>Username</Name><br>
<Value>root</Value><br>
</Parameter><br>
<Parameter><br>
<Name>Password</Name><br>
<Value>password</Value><br>
</Parameter><br>
<Parameter><br>
<Name>Service</Name><br>
<Value>database@localhost:3306</Value><br>
</Parameter><br>
<Parameter><br>
<Name>DataStore</Name><br>
<Value /><br>
</Parameter><br>
</FeatureSource></font> </div>
<div> </div>
<div><font face="Arial" size="2">It is quite different as your and it
doesn't work. Maybe there is a bug in Maestro or I need to upgrade my
version, I'm using Mapguide Maestro version 1.0.9.15919</font></div>
<div> </div>
<div><font face="Arial" size="2">Regards</font></div>
<div><font face="Arial" size="2">Manel Gimeno</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">-----
Original Message ----- </div>
<div
style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a moz-do-not-send="true" title="s.dalakov@mapware.net"
href="mailto:s.dalakov@mapware.net">Stefan Dalakov</a> </div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b>
<a moz-do-not-send="true" title="mapguide-users@lists.osgeo.org"
href="mailto:mapguide-users@lists.osgeo.org">MapGuide Users Mail List</a>
</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b>
Monday, April 06, 2009 8:03 PM</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b>
Re: [mapguide-users] Can't create layer using MySQL feature source</div>
<div><br>
</div>
Here is the FeatureSource<br>
<br>
I find interesting thing here.<br>
When I open this FeatureSource in MG Studio I see<br>
my server name appearing under "Service"<br>
In Maestro the same server name appears under "Database", while
"server" <br>
and "port" fields remain empty.<br>
Do you have MG Studio ?<br>
How did your data get in MySQL format ?<br>
If you don't manage, mail me directly, not thru the list and I will
send <br>
you the pwd.<br>
<br>
Stefan Dalakov<br>
<br>
<?xml version="1.0" encoding="utf-8"?><br>
<FeatureSource xmlns:xsi="<a moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"
<br>
xmlns:xsd="<a moz-do-not-send="true"
href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"
<br>
xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd"><br>
<Provider>OSGeo.MySQL</Provider><br>
<Parameter><br>
<Name>Username</Name><br>
<Value>%MG_USERNAME%</Value><br>
</Parameter><br>
<Parameter><br>
<Name>Password</Name><br>
<Value>%MG_PASSWORD%</Value><br>
</Parameter><br>
<Parameter><br>
<Name>Service</Name><br>
<Value>mysql2.winhostingcenter.com</Value><br>
</Parameter><br>
<Parameter><br>
<Name>DataStore</Name><br>
<Value>technop_mg</Value><br>
</Parameter><br>
<SupplementalSpatialContextInfo><br>
<Name>Default</Name><br>
<CoordinateSystem>LOCAL_CS["Non-Earth
(Meter)",LOCAL_DATUM["Local <br>
Datum",0],UNIT["Meter", <br>
1],AXIS["X",EAST],AXIS["Y",NORTH]]</CoordinateSystem><br>
</SupplementalSpatialContextInfo><br>
<ConfigurationDocument>config.xml</ConfigurationDocument><br>
</FeatureSource><br>
<br>
<br>
Manel Gimeno wrote:<br>
> Thanks Stefan.<br>
> <br>
> I think the main problem is in the connection to MySQL. Even
Mapguide <br>
> Maestro says that there is no error reported I've tried to use the
<br>
> FeatureSource to connect using MapAgent/Test connection and the
test <br>
> doesn't work (it return false).<br>
> <br>
> Could you send me your FeatureSource XML to try to find where the <br>
> problem is?<br>
> <br>
> Thanks in advance<br>
> Manel Gimeno<br>
> <br>
> ----- Original Message -----<br>
><br>
> *From:* Stefan Dalakov <<a moz-do-not-send="true"
href="mailto:s.dalakov@mapware.net">mailto:s.dalakov@mapware.net</a>><br>
> *To:* MapGuide Users Mail List<br>
> <<a moz-do-not-send="true"
href="mailto:mapguide-users@lists.osgeo.org">mailto:mapguide-users@lists.osgeo.org</a>><br>
> *Sent:* Monday, April 06, 2009 4:48 PM<br>
> *Subject:* Re: [mapguide-users] Can't create layer using MySQL<br>
> feature source<br>
><br>
> Hi Manel,<br>
> Here is a layerDefinition that works for me.<br>
> Have you specified Coordinate-System-Overrides ?<br>
><br>
> Stefan Dalakov<br>
><br>
> <?xml version="1.0" encoding="UTF-8" ?><br>
> - <#> <LayerDefinition<br>
> xmlns:xsi="*<a class="moz-txt-link-freetext" href="http://www.w3.org/2001/XMLSchema-instance*">http://www.w3.org/2001/XMLSchema-instance*</a>"<br>
> xsi:noNamespaceSchemaLocation="*LayerDefinition-1.1.0.xsd*"<br>
> version="*1.1.0*"><br>
> - <#> <VectorLayerDefinition><br>
>
<ResourceId>Library://mysql_ds.FeatureSource</ResourceId><br>
> <FeatureName>Fdotechnop_mg:links</FeatureName><br>
> <FeatureNameType>FeatureClass</FeatureNameType><br>
> - <#> <PropertyMapping><br>
> <Name>LAYER</Name><br>
> <Value>LAYER</Value><br>
> </PropertyMapping><br>
> - <#> <PropertyMapping><br>
> <Name>LENGTH</Name><br>
> <Value>LENGTH</Value><br>
> </PropertyMapping><br>
> <Geometry>ogc_geom</Geometry><br>
> - <#> <VectorScaleRange><br>
> - <#> <PointTypeStyle><br>
> <DisplayAsText>false</DisplayAsText><br>
> <AllowOverpost>false</AllowOverpost><br>
> - <#> <PointRule><br>
> <LegendLabel /><br>
> </PointRule><br>
> </PointTypeStyle><br>
> - <#> <LineTypeStyle><br>
> - <#> <LineRule><br>
> <LegendLabel>'Main Pipe'</LegendLabel><br>
> <Filter>"LAYER" = 'Main Pipe'</Filter><br>
> - <#> <LineSymbolization2D><br>
> <LineStyle>Solid</LineStyle><br>
> <Thickness>2</Thickness><br>
> <Color>FF000000</Color><br>
> <Unit>Points</Unit><br>
> <SizeContext>DeviceUnits</SizeContext><br>
> </LineSymbolization2D><br>
> </LineRule><br>
> - <#> <LineRule><br>
> <LegendLabel>'Pipeline'</LegendLabel><br>
> <Filter>"LAYER" = 'Pipeline'</Filter><br>
> - <#> <LineSymbolization2D><br>
> <LineStyle>Solid</LineStyle><br>
> <Thickness>2</Thickness><br>
> <Color>FF000080</Color><br>
> <Unit>Points</Unit><br>
> <SizeContext>DeviceUnits</SizeContext><br>
> </LineSymbolization2D><br>
> </LineRule><br>
> - <#> <LineRule><br>
> <LegendLabel /><br>
> - <#> <LineSymbolization2D><br>
> <LineStyle>Solid</LineStyle><br>
> <Thickness>0.0</Thickness><br>
> <Color>ff000000</Color><br>
> <Unit>Centimeters</Unit><br>
> <SizeContext>DeviceUnits</SizeContext><br>
> </LineSymbolization2D><br>
> </LineRule><br>
> </LineTypeStyle><br>
> - <#> <AreaTypeStyle><br>
> - <#> <AreaRule><br>
> <LegendLabel /><br>
> - <#> <AreaSymbolization2D><br>
> - <#> <Fill><br>
> <FillPattern>Solid</FillPattern><br>
> <ForegroundColor>ffffffff</ForegroundColor><br>
> <BackgroundColor>ff000000</BackgroundColor><br>
> </Fill><br>
> - <#> <Stroke><br>
> <LineStyle>Solid</LineStyle><br>
> <Thickness>0.0</Thickness><br>
> <Color>ff000000</Color><br>
> <Unit>Centimeters</Unit><br>
> <SizeContext>DeviceUnits</SizeContext><br>
> </Stroke><br>
> </AreaSymbolization2D><br>
> </AreaRule><br>
> </AreaTypeStyle><br>
> </VectorScaleRange><br>
> </VectorLayerDefinition><br>
> </LayerDefinition><br>
><br>
><br>
> Manel Gimeno wrote:<br>
>> Hi all,<br>
>> <br>
>> I've created a MySQL FeatureSource in Mapguide 2.0 using
Mapguide<br>
>> Maestro 1.0.9.15910. When I click in the test connection
button<br>
>> no error is reported, so it seems the connection to MySQL
works fine.<br>
>> <br>
>> When I try to create a FeatureLayer using the MySQL
FeatureSource<br>
>> previously defined the following error happens after
selecting<br>
>> the FeatureSource as resource:<br>
>> <br>
>> "Failed to read schema from data source.<br>
>> The operation gave the error message: Error en el servidor<br>
>> remoto: (559) MgConnectionFailedException.:<br>
>> Cannot establish connection.<br>
>> Exception occurred in method<br>
>> MgServerDescribeSchema::ExecuteDescribeSchema() at line
173 in<br>
>> file<br>
>>
d:\buildforgeprojects\mapguide_open_source_v2.0\build_23.8\mgdev\server\src\services\feature\ServerDescribeSchema.cpp"<br>
>> <br>
>> Can anyone help me to solve this problem? (Maybe if you
have an<br>
>> example of XML LayerDefinition using a MySQL
FeatureSource...)<br>
>> <br>
>> Thanks in advance<br>
>> Manel Gimeno<br>
>>
------------------------------------------------------------------------<br>
>><br>
>> _______________________________________________<br>
>> mapguide-users mailing list<br>
>> <a moz-do-not-send="true"
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
>> <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
>> <br>
><br>
>
------------------------------------------------------------------------<br>
> _______________________________________________<br>
> mapguide-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
><br>
>
------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> mapguide-users mailing list<br>
> <a moz-do-not-send="true"
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
> <a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
> <br>
<br>
_______________________________________________<br>
mapguide-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a></blockquote>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
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>
<br>
</body>
</html>