SchemaService
The SchemaService is the service which is extensively used by the SXML Code Editor to retrieve the schema sets applicable for the current site.
The SXML Code Editor uses its own built-in client proxy to communicate with the SchemaService and the retrieved schema sets are cached locally within the user's AppData\Local\Smartsite Software\Smartsite SXML Editor\Cache folder.
When the SXML Code Editor is initialized it checks whether the locally cached schema sets are up-to-date, if not a new set is retrieved using the SchemaService to update the local cache.
Since this service is used from inside the SXML Code Editor, which runs within the browser, the endpoint must be configured to use a publicly available address (using basicHttpBinding and an public address pointing to your site).
Configuration
As for all WCF services hosted in the publication engine, the SchemaService configuration itself is limited to the web.config configuration file (besides the fact it should be registered within the services section within the smartsite.config file).
The example below shows the system.serviceModel section with just the necessary configuration elements for this particular service.
XML | Copy Code |
---|---|
<system.serviceModel> <services> <service name="Smartsite.Core.Services.SchemaService"> <endpoint address="http://siteurl/sitename/SchemaService" binding="basicHttpBinding" bindingConfiguration="SchemaServiceBinding" contract="Smartsite.Core.Services.ISchemaService" /> </service> </services> <bindings> <basicHttpBinding> <binding name="SchemaServiceBinding"> <readerQuotas maxStringContentLength="32768" /> </binding> </basicHttpBinding> </bindings> </system.serviceModel> |
The name of the service element reflects the namespace-scoped class-name which provides the SchemaService, whereas the contract attribute of the endpoint element reflects the interface implemented by this service.
Note that sitename in the address attribute of the endpoint element should be substituted with your site's name and siteurl with the public address of your site (the service should be publicly available through http).