This article details the steps to integrate Mobiliteam with DevExpress XAF applications using a Middle Tier WCF Application. The eXpressApp Framework (XAF) is a modern and flexible application framework that allows you to create powerful line-of-business applications that simultaneously target Windows and the Web.

For the purpose of demonstration, we assume that you have an existing application that is built on XAF using eXpress Persistent Objects. We have created a simple CRM application with Standard Authentication on XAF for integration with Mobiliteam. This CRM application created by the XAF framework has a modular architecture as show below.


  1. The XAF Middle Tier WCF Application Server only works with eXpress Persistent Objects. If you have used Entity Framework (EF) Objects, you need to use the Middle Tier Application Server with Remoting Services. 
  2. The XAF application should have an authentication configured. When using the Middle Tier, it expects authentication details to be passed to ensure secure access to the system from external sources.

 Basic Architecture

In order to achieve an integration between Mobiliteam and DevExpress XAF, you could choose from one of two methods.

  1. Database Integration – Mobiliteam has a set of database integration wizards which can quickly setup two way integration between your application database and Mobiliteam.
  2. Middle Tier Application Server – Mobiliteam can connect to a Middle Tier WCF Application Server created by the DevExpress XAF to securely integrate between your application and Mobiliteam.

This article will focus on the second method of integration – Middle Tier Application Server. The suggested architecture for this integration method is shown below. The only component that needs to be additionally developed is the Middle Tier WCF Application Server for which the XAF provides a project template, making it easy to setup within minutes. You do not need to re-configure or modify your existing XAF applications to create this integrated solution.

Integration Architecture

Existing XAF Application – CRM

Consider an existing XAF Application – CRM, which manages leads, opportunities and customers. Your sales team suggests that they need access to the same application on the field, to instantly add leads to the system that result from their daily meetings and interactions with customers.


Middle Tier WCF Application Server

Assuming that the CRM was built without a Middle Tier Application Server, we need to create this layer to enable Mobiliteam to communicate with the CRM. If the CRM was built using the Middle Tier Application Server, you may skip this step.

Note: This step is only required for existing XAF applications. If you are creating a new XAF application, use the DevExpress XAF Solution Wizard to create an application that uses the WCF Middle Tier Application Server.

Pre-requisite: If your existing XAF Module does not have a reference to Security System User, you need to add this reference. Navigate to the Module designer in your Application.Module project, select Security System User under DevExpress ExpressApp Security in the Exported Types and press the SPACEBAR. This will automatically add all linked references too.

Security System User

1. Create a new Project > DevExpress Console Application Server

Note: In production scenarios you should choose the DevExpress Windows Service Application Server


2. Open App.config and update the connection string to point to your CRM database and configure the credentials to connect to your database.

3. Add a reference to all application modules. The dll that contains the Business Objects i.e. Application.Module, Application.Module.Win and Application.Module.Web. In this example the files are CRM.Module.dll, CRM.Module.Win.dll and CRM.Module.Web,dll


4. Under the following code in the Main function of Program.cs add your client module references

5. Replace the existing code that creates a Remoting Server to code that will create a WCF Server.

In the Main function in Program.cs replace the below code

with the following code:

6. Add a reference to System.ServiceModel.dll

7. Remove unused reference to System.Runtime.Remoting.dll

8. Add the below code to the top section of Program.cs

9. Remove unused references to Remoting namespaces from the top section of Program.cs

10. Change the application name to the relevant application name


Now run the application server and check if all is well. If you get a security exception, try and run the application in administrator mode. If every step was done correctly, you should see the below screen.


Lead Form on Mobile

Login to your Mobiliteam account and add a new Form Type. Create a form type and name it Lead and add fields as required by you on the mobile. In this example, we have added all the fields visible on the CRM application against a lead i.e Name, Email, Mobile, Company and Designation.


Create a Team called Sales and give this team access to the newly created form. The form will then be visible to all members who are a part of the Sales team on Mobiliteam.

Integrate Lead Form with Middle Tier

1. Enable the DevExpress connector in mobiliteam

Login to mobiliteam and navigate to the Connectors page. On the page press the switch to enable the DevExpress connector.


2. Configure user credentials to access XAF application data.

In mobiliteam, navigate to Members and click on Connectors against a member. Repeat the below steps for all members who have access to the Lead form on the mobile.


A list of connector settings that can be configured against the member are displayed. Click on Configure against the DevExpress connector for the member.


A list of settings that can be configured are displayed. Fill in the values and click Save to persist the member credentials.


3. Configure the lead form in mobiliteam to integrate with the XAF application.

Navigate to the Form Type ‘Lead’ created earlier and click the Integrations link in the listing screen. Click New > REST and configure the integration.

  • Set the name as DevExpress
  • Configure the Url to your mobiliteam orchestration server url e.g.
  • Select the Method as POST
  • Add a Header for content type i.e. Content-Type: application/json
  • Configure the Form Data to submit values from the mobile form to the Orchestration server. E.g.





4. Finally copy your Application.Module dll in to the Orchestration server under the path Root > Assemblies > XAF

DONE !!!

Submit a lead from your mobile application and it will display in your XAF application.