Prerequirement

Make sure you have Microsoft SQL Server System CLR Types installed. It can be downloaded here

Web Application

Copy the contents of OGC WebService Binary into the web application folder.

Connection String

There are two ways to configure connection string.
  • Embed entity data model defintion
This is a default implementation. The service comes with embed entity data mode which design to work against ODM v1.1 database. In this case all you need to do is to provide valid database server name, database name and credential. An example:
<add name="SosEntities" connectionString="metadata=res://*/Sos.Sos.csdl|res://*/Sos.Sos.ssdl|res://*/Sos.Sos.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost;Initial Catalog=Odm11;User ID=myuser;Pwd=mypassword;Application Name=SOS;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
  • Not embed entity data model definition
You might chose this option if you want to use database other then ODM v1.1 . In this case, on top of database configuration, you will need to specify which entity model to use and where it is located.
For example:
<add name="SosEntities.Files" connectionString="metadata=~/bin/Sos\Sos.csdl|~/bin/Sos\Sos.ssdl|~/bin/Sos\Sos.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost;Initial Catalog=Odm11;User ID=myuser;Pwd=mypassword;Application Name=SOS;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
or
<add name="SosEntities.Files" connectionString="metadata=c:\MyModel\Sos\Sos.csdl|c:\MyModel\Sos\Sos.ssdl|c:\MyModel\Sos\Sos.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=localhost;Initial Catalog=Odm11;User ID=myuser;Pwd=mypassword;Application Name=SOS;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

Operations

There few required and some optional operation settings that you can use to configure the service operation. Required operations are marked as bold.
  • name - specifies configuration name inside web.config and must be unique
  • service - specifies OWS service name
  • version - specifies service version, required for all services except GetCapabilities
  • operation - specifies opreation name for the service. This is matched against request parameters which provided in URL when service is being called.
  • connection - specifies connection name to be used by operation, it is possible to configure multiple services to work with different databases
  • cacheEnabled - specifies whether it caches operation results or not. Default value is true.
  • cacheTimeout - specifies for how long service should be inactive to invalidate the cache . Default 20 minutes
  • type - specifies what type should be used to process this operation request. Type should inherit from BaseOperation class.

Last edited Mar 31, 2009 at 8:03 PM by olegkap, version 1

Comments

No comments yet.