[fdo-users] Managed Bindings and WMS

Greg Boone greg.boone at autodesk.com
Thu Mar 13 16:12:15 EDT 2008


Try this...

IDescribeSchemaMapping schema = (IDescribeSchemaMapping) m_connection.CreateCommand(CommandType.CommandType_DescribeSchemaMapping);
PhysicalSchemaMappingCollection mappings = schema.Execute();
OSGeo.FDO.Providers.WMS.Override.OvPhysicalSchemaMapping wmsMapping = new OSGeo.FDO.Providers.WMS.Override.OvPhysicalSchemaMapping(mappings[0]);

Constructor Notes:

    Constructs a physical schema mapping instance using the
    result returned from IConnection.CreateSchemaMapping OR using the result of
    executing an IDescribeSchemaMapping command. This constructor is provided
    in order that clients are provided a mechanism to downcast from the FDO
    PhysicalSchemaMapping base class to an FDO Provider specific class
    that derives from PhysicalSchemaMapping. This constructor is the only
    mechanism provided by the FDO Managed API that will allow the client to correctly
    construct a provider specific PhysicalSchemaMapping class.

    NOTE: If the Provider name associated to the input parameter schemaMapping does not
    correspond to the provider name of the expected FDO Provider, and InvalidArgumentException
    will be thrown.

Greg

-----Original Message-----
From: fdo-users-bounces at lists.osgeo.org [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of ssakharov
Sent: Thursday, March 13, 2008 3:17 PM
To: fdo-users at lists.osgeo.org
Subject: [fdo-users] Managed Bindings and WMS



Hi all,

this code fails with a cant cast exception, unable to cast
PhysicalSchemaMapping to .WMS.Override.OvPhysicalSchemaMapping.

IDescribeSchemaMapping schema =
(IDescribeSchemaMapping)m_connection.CreateCommand(CommandType.CommandType_DescribeSchemaMapping);

PhysicalSchemaMappingCollection mappings = schema.Execute();
OSGeo.FDO.Providers.WMS.Override.OvPhysicalSchemaMapping wmsMapping =
(OvPhysicalSchemaMapping)mappings[0];   // exception here

Is there something I am missing?  I beleive this should work after reading
void WmsTestSelect::testNASAServerDefaultOverrides ().

Any help would be greatly appreciated,
Thanks.




--
View this message in context: http://www.nabble.com/Managed-Bindings-and-WMS-tp16036200s18162p16036200.html
Sent from the fdo-users mailing list archive at Nabble.com.

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


More information about the fdo-users mailing list