If you added your Xomega project manually to your solution, then the default namespace for the generated WCF service contracts will be
Gen. If you used a Xomega wizard to create your WPF, Silverlight or ASP.NET solution, then the default namespace for the generated WCF service contracts will be
<YourSolution>.Services and
<YourSolution>.Entities.Services for the generated default service implementation classes.
If you need to specify a custom namespace to be used for your WCF service contracts or service implementation classes, then follow the steps described below.
- Open the global configuration file for your model, which contains config element as the root. If you don't have such file, add one to the Xomega project by clicking the Add New Item menu on the project and selecting the Xomega Model Configuration template.
- Add or locate the wcf:services element inside the global config element, where the wcf prefix should be mapped to the "http://www.xomega.net/wcf" namespace.
- Set the namespace attribute of that element to your custom namespace for the WCF service contracts.
- Set the implNamespace attribute of that element to your custom namespace for the generated default service implementation classes.
- Generate the WCF service contracts and other artifacts that depend on the WCF services and make sure that they all use the right namespace.
Here's an example of a global configuration that defines a custom namespace for the WCF services.
Code:
<config xmlns="http://www.xomega.net/omodel"
xmlns:wcf="http://www.xomega.net/wcf">
<wcf:services namespace="MySolution.Services" implNamespace="MySolution.Services.Impl"/>
</config>