Compiling the Web Service - Lesson 2
The modeling phase of the extended Web service has been completed. Now, you can compile and deploy the UML model. Then, you can test the deployed xUML service with the E2E Model Debugger.
Two UML model files are displayed in the Deployment View of the Model Compiler window:
Expand the file lesson2.xml to compile the xUML service EducationLesson2:
While E2E Builder for MagicDraw is compiling, the Working… window will be displayed:
It could be possible that the example was not compiled without errors. In this case, the xUML Service EducationLesson2 would have turned red. In the following chapter, it will be explained, how to solve such a problem.
Solving Errors
If the Model Compiler reports an error, it tells you what problem was found. It will also guide you to the location in the containment tree, where the error occurred.
The Model Compiler shows all error messages in the E2E Messages window and in the tree of the deployment view below the deployment of the xUML service. Refer to Solving Errors in lesson 1 for a detailed explanation of how to trace errors.
If you find no way to fix possible problems in your lesson 2 model, you can use the solution model of lesson 2 as a reference. Click the link to download the Builder project Education Solution to your computer and unzip it to a folder of your choice. The solution project contains the solutions of all three lessons.
Select Open E2E Builder Project from the E2E Builder Menu:
Locate the the Builder project Education Solution, select it and click OK:
If you have not opened this project before, the E2E Builder File Chooser pops up. Select the file lesson2.xml in sub folder uml, which contains all reference models of this course with complete solutions:
If you already studied the solution models in lesson1, the builder will automatically open the model file last used, in this case probably lesson1.xml:
Close the project lesson1.xml:
Open the E2E Builder menu and select Open E2E Model > lesson2.xml:
You can compare the solution model with your model to find the error. Switch between open project files using the Opened Projects toolbar of Magic Draw.
By loading lesson2.xml from Builder Project Education Solution your own project Education is no longer the active Builder project, though your own XMI file lesson2.xml is held open within MagicDraw. Wanting to continue working with Education, you will have to reopen the project.
Finally, return to your own model. Close the solution project using the MagicDraw menu items File > Close Project (select the solution model first). Remember, that in MagicDraw a project is a model file and should not be mixed up with a Builder project:
Switch the Builder project again. Select E2E Builder > Reopen and choose your Builder project (Education) from the list:
Note the change in the MagicDraw title bar. The Builder project name has changed back to Education:
As an alternative, you can continue your studies with the solution model by importing the solution into your own Builder project. Select the menu item Import > XMI File from the Compiler Window's menu:
The File Chooser pops up. Change to the Builder project Education Solution and double-click the folder uml:
Choose lesson2.xml, as you want to import the solution model of lesson 2 and click OK:
Now define the destination of the imported model. The default folder is the uml folder of the current Builder project. Change the file name to e.g. lesson2_solution.xml and click OK:
The imported model is listed in the deployment view of the Model Compiler window. You could compile this model and continue with it to the end of lesson 2: