<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thanks Stefan.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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><FONT face=Arial size=2></FONT> </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><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Using directly Mapguide Maestro the XML
generated is:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><?xml version="1.0"
encoding="utf-8"?><BR><FeatureSource xmlns:xsi="<A
href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>"
xmlns:xsd="<A
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><FONT face=Arial size=2></FONT> </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><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV>
<DIV><FONT face=Arial size=2>Manel Gimeno</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=s.dalakov@mapware.net href="mailto:s.dalakov@mapware.net">Stefan
Dalakov</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=mapguide-users@lists.osgeo.org
href="mailto:mapguide-users@lists.osgeo.org">MapGuide Users Mail List</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, April 06, 2009 8:03
PM</DIV>
<DIV style="FONT: 10pt arial"><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
href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>"
<BR>xmlns:xsd="<A
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
href="mailto:s.dalakov@mapware.net">mailto:s.dalakov@mapware.net</A>><BR>>
*To:* MapGuide Users Mail List<BR>> <<A
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="*http://www.w3.org/2001/XMLSchema-instance*"<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
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A><BR>>>
<A
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
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A><BR>>
<A
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
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A><BR>>
<A
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
href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A><BR><A
href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</A></BLOCKQUOTE></BODY></HTML>