Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How to configure namespaces for generated services
xomega
#1 Posted : Friday, July 1, 2011 4:45:25 PM(UTC)
xomega



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.
  1. 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.
  2. 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.
  3. Set the namespace attribute of that element to your custom namespace for the WCF service contracts.
  4. Set the implNamespace attribute of that element to your custom namespace for the generated default service implementation classes.
  5. 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>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Copyright © 2009-2022 Xomega.Net. All rights reserved.