config.xml, the 4S4C Configuration File

Starting with 4S4C v1.2, the SOAP/COM dispatcher can be controlled via a configuration file. This makes it easy to write completely generic listeners. The file defines a list of COM Components and Interfaces to be exposed via SOAP and the namespaces that should be associated with them.

Config.xml is structured as follows

<mappings name='testService'>
	<mapping methodURI=''        progid='Demo_server.calc'     iid='{BC0E4845-B3F3-4080-B914-3F29FF8A06DF}' />
	<mapping methodURI=''     progid='Demo_server.calc'     iid='{2F4178E5-8627-4930-942A-1EFBB3F4F54E}' />
	<mapping methodURI=''     progid='Demo_server.calc'     iid='{63B54535-8599-4f3c-8718-59177D56F928}' />
	<mapping methodURI=''        progid='Demo_server.dualtest' iid='{E4482471-6E9D-429C-B33E-9D48E0010F03}' />
	<mapping methodURI='' clsid='{5803B782-DF93-49E4-9105-ED31AB530511}' iid='{91D32B9C-8837-4D08-8F02-945A209E4DB1}' />
	<mapping name='typesTest' methodURI='' progid='Demo_server.calc'     iid='{02A1A326-4489-4b28-A6A9-91F1727672F3}' />
each mapping entry specifies a methodURI, this is the namespace URI for the methodName element, for example to if you want to call the Calc functions in the demo server (mapping entry 1), your SOAP request would look like
<env:Envelope xmlns:env='' xmlns:enc=''>
  <m:Add xmlns:m=''>
See how the Add element specifies the relevant namespace URI.

Each mapping element can specify either the prog-id or the classid of the component to create, to make the method call against. In the case where the prog-id is specified, this is resolved to a classid once only, no matter how many requests are received for it, so adds very little overhead. The iid attribute should specify the GUID of the interface that is to be exposed. If a component implements multiple interfaces and you want to expose all of them, you will need a mapping entry for each interface. If you're unsure of how to find out the IID, see the tutorial, which shows how to use OleView to Find out the IID.

The mappings element has an optional name attribute which is used by the WSDL generator to name the service, if no name is specified it defaults to Service. Each mapping element also has an optional name attribute which is used by the WSDL generator to name the port (in the services section). If no name is specified then it default to the name of the interface being exposed.

Starting with v.1.3.7, the configFactory object [which manages the config.xml files], will watch for changes in each config.xml file it is caching, if it's changed, then it will drop the cached copy, and re-read the file. This allows you make config changes without having to restart IIS.

<<< Interoperability with other SOAP toolkits      >>> Using the HTTP Listener