Upload
e2e-bridge-documentation
View
763
Download
2
Embed Size (px)
DESCRIPTION
The E2E Education Lessons 1 -3 serve as a self learning program for developing a Web service with E2E Bridge. The education leads you through a development process divided into three lessons, which will teach you to build services based on the E2E Bridge platform. Each lesson can be accomplished in about a day.
Citation preview
Education
Lesson 1
Model-driven
integration based
on executable UML®
E2E Bridge™
Base Version 5.1
Release 5.1.3
October 26, 2012
E2E Technologies Ltd Lautengartenstrasse 12
CH-4052 Basel, Schweiz
T +41 61 270 97 10
W www.e2ebridge.com
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 2
Table of Contents
1 Introduction ......................................................................................................................................................................... 5
1.1 Documentation Map ..................................................................................................................................................................................................... 6
1.2 Goal of E2E Bridge® Education .............................................................................................................................................................................. 7
1.2.1 Preconditions ........................................................................................................................................................................................................ 7
1.3 Overview ............................................................................................................................................................................................................................. 8
2 Introduction to the E2E Bridge® Platform .......................................................................................................................... 9
2.1 Terminology .................................................................................................................................................................................................................... 10
2.2 E2E Bridge® ...................................................................................................................................................................................................................... 11
2.3 E2E Bridge® Architecture ........................................................................................................................................................................................ 12
2.3.1 Everything UML® ............................................................................................................................................................................................... 12
2.3.2 E2E Composite Service ................................................................................................................................................................................. 13
2.3.3 Development Steps on the E2E Bridge® Platform ......................................................................................................................... 13
3 Installation of Software ..................................................................................................................................................... 15
3.1 MagicDraw UML 16.9 ................................................................................................................................................................................................. 16
3.2 E2E Builder for MagicDraw ................................................................................................................................................................................... 17
3.3 Microsoft SOAP Toolkit 3.0 ..................................................................................................................................................................................... 19
4 Working with MagicDraw™, E2E Builder, and E2E Builder Templates ........................................................................ 20
4.1 Starting MagicDraw™ with E2E Builder ........................................................................................................................................................ 21
4.2 Opening an Existing E2E Builder Project ..................................................................................................................................................... 22
5 Introduction to the Development Process ....................................................................................................................... 26
5.1 Use Cases........................................................................................................................................................................................................................ 27
5.2 Classes ............................................................................................................................................................................................................................. 28
5.3 Web Service Interface .............................................................................................................................................................................................. 29
5.4 Activities .......................................................................................................................................................................................................................... 30
5.5 Sequences ....................................................................................................................................................................................................................... 31
5.6 Components and Deployments .......................................................................................................................................................................... 32
6 Creating a Web Service..................................................................................................................................................... 33
6.1 Assignment .................................................................................................................................................................................................................... 34
6.2 Using E2E Builder ...................................................................................................................................................................................................... 35
6.2.1 Creating a new Builder Project ............................................................................................................................................................... 35
6.2.2 E2E Builder Tools ............................................................................................................................................................................................ 39
6.2.3 Navigating in UML Diagrams ................................................................................................................................................................... 42
6.2.4 Diagram Info....................................................................................................................................................................................................... 43
6.2.5 MagicDraw Projects Versus E2E Builder Projects ...................................................................................................................... 43
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 3
6.3 Use Cases........................................................................................................................................................................................................................ 45
6.3.1 Creating the Use Case Diagram “Product Query Overview” .................................................................................................. 46
6.3.2 Creating the Use Case Diagram “Define a Title”........................................................................................................................... 54
6.4 Classes ............................................................................................................................................................................................................................. 63
6.5 Port Type.......................................................................................................................................................................................................................... 64
6.5.1 Renaming the Packages ............................................................................................................................................................................. 64
6.5.2 Defining the Port Type .................................................................................................................................................................................. 66
6.5.3 Defining the Operation ................................................................................................................................................................................. 69
6.5.4 Defining the Operation Parameters ..................................................................................................................................................... 70
6.5.5 Assigning the Activity Diagram to the Operation .......................................................................................................................... 72
6.6 Activities .......................................................................................................................................................................................................................... 75
6.6.1 Activities and Activity Diagrams ............................................................................................................................................................. 75
6.6.2 Adding Parameters to the Activity......................................................................................................................................................... 78
6.6.3 Designing the Control Flow ....................................................................................................................................................................... 84
6.6.4 Designing the Object Flow ......................................................................................................................................................................... 86
6.6.5 Using E2E Action Language ...................................................................................................................................................................... 89
6.6.6 Creating Notes .................................................................................................................................................................................................. 94
6.7 Sequences ...................................................................................................................................................................................................................... 96
6.8 Component and Deployment Diagram ......................................................................................................................................................... 107
6.8.1 Component Diagram.................................................................................................................................................................................... 107
6.8.2 Deployment Diagram .................................................................................................................................................................................. 107
6.8.3 E2E Components and Deployment Wizard Overview ............................................................................................................... 108
6.8.4 Using the E2E Components Wizard .................................................................................................................................................... 109
6.8.5 Using the E2E Deployment Wizard ..................................................................................................................................................... 120
7 Compilation ..................................................................................................................................................................... 125
7.1 Solving Errors ............................................................................................................................................................................................................ 128
8 Testing with E2E Interactive Debugger ......................................................................................................................... 137
8.1 Running the Service ................................................................................................................................................................................................ 138
8.2 Running a Test Case ................................................................................................................................................................................................ 141
8.3 Debugging the Service .......................................................................................................................................................................................... 145
8.4 Using the Web Service with the Excel Client ............................................................................................................................................ 153
9 E2E Development Server and E2E Console ................................................................................................................... 157
9.1 Advantages of the E2E Development Server containing the E2E Console .............................................................................. 158
9.2 Installation of E2E Server .................................................................................................................................................................................... 159
9.2.1 E2E Server Domains .................................................................................................................................................................................... 159
9.3 Starting the E2E Console...................................................................................................................................................................................... 160
9.4 Installing the E2E License Key ......................................................................................................................................................................... 162
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 4
9.5 Deploying the Compiled Composite Service ............................................................................................................................................. 164
9.6 E2E Console ................................................................................................................................................................................................................. 166
9.7 Testing the Deployed Composite Service ................................................................................................................................................... 168
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 5
1 Introduction
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 6
1.1 Documentation Map
The Bridge is delivered with comprehensive documentation. Apart from this self-study, the Bridge also comes with many
examples you can have a look at. Each feature is subject of an example that is ready to run.
This chapter provides an overview about all documentation available after installation. If you did not change the default
location of the E2E documentation, you will find all documents and examples in folder C:\E2EBridgeDocumentation_5
\Documentation.
Additionally, all documentation is available online at the E2E Homepage.
Document Content
E2E Bridge Education Lesson 1-3
(this document)
Comprehensive self-learning guide, which leads you through all steps of creating
a Web Service. Additionally, it provides conceptional information for each topic.
E2E Bridge Reference Guide Comprehensive Bridge guide containing information about architecture, concepts,
modeling, E2E Action language, add-ons, and import/export mechanisms.
E2E Bridge Server User Guide Comprehensive guide explaining concepts and usage of E2E Console, which
comprises all management tasks to run the Bridge and deployed composite
services.
E2E Bridge Builder User Guide Comprehensive guide explaining concepts and usage of E2E Builder including all
tools like E2E Model Compiler, E2E Model Debugger, and E2E Importers.
E2E Bridge Server Installation Guide Description of the installation of E2E Console including a troubleshooting chapter.
This guide also contains a description of the following firmware installations:
E2E SQL Libraries to integrate SQL databases
E2E SAP Libraries to integrate SAP systems
E2E Java Libraries to use Java classes in your service
E2E Bridge Builder Installation
Guide
Description of the installation of E2E Builder including a troubleshooting chapter.
E2E Analyzer Installation Guide Description of the installation of E2E Analyzer.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 7
1.2 Goal of E2E Bridge® Education
This document is one of three documents, which serves as a self learning program for developing a Web service with E2E
Bridge. The education leads you through a development process divided into three lessons, which will teach you to build
services based on the E2E Bridge platform.
By reading this document, you will learn
how to install the software and tools on your system, which are necessary to develop, test, and run a simple Web
service
how to handle E2E Builder for MagicDraw and E2E Embedded Server
how to draw a UML model with MagicDraw™
how to compile and deploy your own composite service with the E2E Model Compiler
how to test and debug your own Web service with the E2E Interactive Debugger
how to use your own Web service with a client (Excel)
how to manage service composites on the E2E Console
You will practice tool relevant tasks throughout the course. This document references further explanations in additional
documents (e.g. xy.pdf). These supplement documents can all be found within the installed documentation (see also chapter
Documentation Map).
1.2.1 Preconditions
Knowledge in UML modeling, Web services, object-oriented design, or scripting languages is not required, but may be
helpful for some more complex implementations. The degree of difficulty increases from lesson 1 to 3.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 8
1.3 Overview
The E2E Bridge® Education is a base course for everyone who wants to gain experience with the E2E Bridge® platform in
order to develop a service based on the Model Driven Integration (MDI) approach in an easy and fast way.
Model Driven Integration (MDI) is a ground-breaking approach to integrate, migrate, and consolidate heterogeneous
distributed software systems. It raises the level of abstraction from non-transparent, mostly undocumented code to
unambiguous executable models, which serve simultaneously as documentation and production runtime. With MDI,
executable models in form of UML®, BPMN®, and ARIS EPC are used as the exclusive source to build complex business
application and integration scenarios.
By reading this document, you will learn the basics how to create composite services, which integrate lower level backend
access functions to communicate with existing backend applications and services. The E2E runtime infrastructure houses
the various interface bridging adapters for synchronous and asynchronous application connectivity. Out-of-the-box, the
E2E Bridge supports a broad selection of public and proprietary interface standards, covering access to databases,
systems, message protocols, and platform-specific connectivity, including Java EE and the proprietary t/RFC protocols
from SAP.
The notion of a service is used in the SOA request/response pattern: a service is a function that is well defined, self-
contained, and does not depend on the state of other services. However, most frequently it depends on interfaces of other
services.
Nowadays, the term service is often used synonymously with Web service. Although Web services are an important service
type, the Bridge not only enables you to model Web services but also other kinds of services such as SAP RFC services or
timer services used for EDA patterns.
The education is structured into three major lessons. It will take about three to four days to complete all lessons.
Each lesson is described in one document. Some additional learning materials are also referenced and available as
necessary.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 9
2 Introduction to the E2E Bridge® Platform
The E2E Bridge® is completely based on open standards like UML®, XML, SOAP, Web services, etc. These standards are
widespread and widely accepted in the commercial arena (Microsoft®, IBM®, Sun, SAP, etc.). The following chapter explains
these standards briefly and gives you a short overview about the Bridge.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 10
2.1 Terminology
As some important terms are used throughout the course, they are explained briefly.
HTTP
The HyperText Transfer Protocol is the protocol of the Web, by which servers and clients (typically browsers) communicate.
An HTTP transaction comprises a request sent by the client to the server, and a response returned from the server to the
client.
SOAP
The Simple Object Access Protocol is the message protocol that allows Web services to talk. SOAP is an XML-based
protocol for exchanging information between computers. Although SOAP can be used in a variety of messaging systems
and can be delivered via a variety of transport protocols, the main focus of SOAP is on Remote Procedure Calls (RPC)
transported via HTTP. SOAP is platform independent, and therefore enables diverse applications to communicate with each
other.
UML®
The Unified Modeling Language (UML) helps you to specify, to visualize, and to document models of software systems,
including their structure and design, in a way that meets all of the application's requirements. You can use UML for
business modeling and modeling of other non-software systems, too.
Web service
A Web service is any piece of software that makes itself available over the Internet and uses a standardized XML data
format. XML is used to encode all communications to a Web service. For example, a client invokes a Web service by
sending an XML message, and then waits for a corresponding XML response. As all communication is in XML, Web
services are not tied to any one operating system or programming language. Thus, they work like a middleware that
enables and simplifies application-to-application connectivity.
WSDL
The Web Service Description Language is an XML grammar that allows a Web service to describe what it can do, what
messages it accepts, and what response it returns.
XMI®
The XML Metadata Interchange Format is an exchange format for UML models. It standardizes the representation of UML
models in XML.
XML
XML is a markup language for documents containing structured information. It is a meta-language for describing markup
languages. In other words, XML provides a facility to define tags and the structural relationships between them. It is being
optimized and designed to deliver structured content over the web and supports a wide variety of applications.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 11
2.2 E2E Bridge®
Services based on the E2E Bridge are defined via a purely model driven approach. The end-to-end modeling process is
done in UML (Unified Modeling Language) comprising the modeling of use cases, data structures, processes, business
logic, and architectural deployment configuration as to how the service is used in production.
The implementation of any Bridge-based service is done entirely using standard UML diagrams, enhanced with a selection
of stereotypes and pre-defined tagged values.
To use the Bridge, in theory it is possible to use any UML editor, which supports the standard model exchange format XMI®
(XML Metadata Interchange). All information, which is necessary to build a service is contained in the XMI document, which
will later be compiled and deployed to an E2E Server, the runtime environment of the Bridge.
Specifying a service in UML provides a reasonable high-level documentation of its inner workings, as well as a description
of the backends it uses. As the UML model strictly reflects all the data flows, event handlers, and operations that the
service will comprise, your documentation will always be up-to-date and reflect the service as it is used in production.
Besides modeling the implementation of service operations, the Model Driven Integration approach implemented by the
Bridge also emphasizes the modeling of the service architecture. This is done by defining the architectural service
components and their deployment configurations explicitly in the UML model. In our point of view, this aspect is crucial to
keep an SOA or an EDA maintainable and manageable.
The Bridge is faithful to the UML standard specifications. All enhancements follow the guidelines of the OMG to extend the
UML base via stereotypes, and pre-defined tagged values.
In the following chapter, the E2E Bridge architecture is explained.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 12
2.3 E2E Bridge® Architecture
The figure below shows the high-level architecture of the E2E Bridge platform. It consists of the E2E Server runtime and
its add-ons. An add-on is any component loadable and manageable by the runtime environment. The two most important
add-on types are frontend services and backend adapters. The frontend services communicate with client applications
using various protocols such as SOAP, SAP RFC, or HTTP(S). The backend adapters enable the Bridge to access various
databases, legacy systems, and of course other Web services. The runtime also manages base functionalities like
processing control flows, handling events, or executing action scripts.
2.3.1 Everything UML®
Since version 4.0, the Bridge supports UML version 2.0. For the configuration of data structures, we use UML classes
unifying different data formats like SOAP, SAP IDocs, or literal XML documents. Application flow and business logic are
defined in UML activities, while the add-on- specific information (e.g. database names) is stored as UML extension
information in the UML model. State machines and asynchronous processes are configured using state diagrams. The UML
model also holds the deployment information, which specifies where the service is located and how it can be addressed.
The reasons for using UML so extensively are:
By using UML models, one single document contains the implementation and documentation. This makes
maintenance and understanding of services much easier.
UML offers also means to describe the architecture, i.e. used components and their deployment. This is crucial for
defining and maintaining a SOA or EDA.
UML is the most popular modeling language, which facilitates the communication among stakeholders (business
analysts, IT professionals, etc.).
There is a standardized exchange format to serialize UML models, called XMI (XML Metadata Interchange Format).
This allows the customer to use any tools to read the Bridge model (see figure below).
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 13
2.3.2 E2E Composite Service
When you have finished designing an E2E Composite Service, the UML model must be compiled with the E2E Model
Compiler, which is part of the E2E Builder IDE. The Builder is integrated in UML editors as plug-in. You can find more
information in the E2E Builder User Guide. The output is a composite service that is loaded into the runtime later and is
optimized in terms of size and speed.
2.3.3 Development Steps on the E2E Bridge® Platform
The E2E Bridge platform is divided into development environment and server.
E2E Development Environment
UML editor supporting XMI (MagicDraw™)
E2E Builder for MagicDraw
E2E Embedded Server (for rapid testing and debugging a service, does not include E2E Console)
E2E Server
E2E Console
E2E Server runtime
Note: E2E Server can be purchased separately as Development, Test, or Production Server. The development
environment contains an embedded E2E Server to run and debug services within the development environment. It
does not include the E2E Console, which provides comprehensive features to manage services with a Web-based
user interface.
Additionally, we recommend using a source control tool to keep track of changes in your UML/XMI files.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 14
Tool Interaction
The picture above displays the workflow and tools associated with each development step.
No. Action
1 Design the service in a UML editor. The UML model is saved in the XMI format.
2 The E2E Importer imports meta data like XML schema or WSDL files, or many others, directly into the UML
model.
3 The Builder optimizes the UML model for the E2E Server runtime. It also checks the model for syntactical
correctness while compiling the model. This step results in a platform independent repository, which contains
the composite service and the corresponding WSDL file. The compiled composite service contains all data
mappings, flow controls, and event processing definitions necessary to execute the service on the E2E Server
runtime. The compiled composite service is a runtime and memory optimized representation of the information
in the UML diagrams.
Once the repository of the service composite is deployed to the Server, the service gets started. The repository
is analyzed and loaded only once during the start-up of each E2E Server process. This preloading results in
less disk I/O tasks at runtime, thus speeding up the runtime considerably.
4 The service returns UML trace data back to the E2E Analyzer, which allows to debug the service graphically
with runtime data.
Alternatively, it is also possible to step through each single action of the service using the E2E Interactive
Debugger.
5 Deployed composite services are managed and monitored with the E2E Console.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 15
3 Installation of Software
All software necessary for implementing and running the education examples must be installed first.
CD E2E Builder:
1. MagicDraw UML 16.9
2. E2E Builder for MagicDraw (includes E2E Model Compiler and E2E Embedded Server)
3. E2E Analyzer (allows to test and analyze services)
4. Microsoft SOAP Toolkit 3.0 (required for SOAP communication of the Excel client)
Inserting the CD will bring up an installation guide in your browser. If it does not start up automatically, double-click the
file index.html on the CD. Make sure to install MagicDraw before E2E Builder for MagicDraw.
We also recommend installing the software according to the suggested default settings on drive C:\.
Software/Tool Space on Disk License Key Required
MagicDraw UML 16.9 540 MB Yes
E2E Builder for MagicDraw 120 MB Yes
E2E Analyzer 130 MB Yes
E2E Bridge Documentation 370 MB No
Microsoft SOAP Toolkit 3.0 < 10 MB No
Total disk space necessary ca. 1.170 MB
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 16
3.1 MagicDraw UML 16.9
In order to install MagicDraw, follow the instructions of the installation guide.
If you open MagicDraw for the first time you have to choose a license file, which you need to order from E2E support
We recommend choosing English in the language setting of MagicDraw, because the education documentation is built with
the English version.
Select Options > Environment.
In the following dialog, choose English as Language from the pull-down menu.
Click OK.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 17
3.2 E2E Builder for MagicDraw
Before installing the Builder, make sure that MagicDraw is properly installed and can be started successfully.
Read the Builder installation guide. You will find the E2E Builder Installation Guide on the E2E Bridge release CD.
Double-click the file setup.exe of the Builder and follow the instructions.
When starting E2E Builder within MagicDraw
for the first time, you have to assign the license
key that can be ordered from E2E Technologies
Choose E2E Builder > Enter License Data from
the menu bar.
Click ... to open the File Chooser.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 18
Navigate to the license file you received from E2E
Technologies, select it, and click OK.
Click OK again to close the license dialog.
After successful completion of this step, the E2E
Builder menu items will be enabled.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 19
3.3 Microsoft SOAP Toolkit 3.0
The SOAP Toolkit is required for the SOAP communication of the Excel client. Double-click the file soapsdk.exe and follow
the instructions.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 20
4 Working with MagicDraw™, E2E Builder, and
E2E Builder Templates
MagicDraw is a visual UML modeling and CASE tool with teamwork support. It is designed for business analysts, software
analysts, programmers, QA engineers, and documentation writers. It facilitates analysis and design of object-oriented
systems and databases and provides the industry's best code engineering mechanism (with full round-trip support for
J2EE, C#, C++, CORBA IDL programming languages, .NET, XML Schema, WSDL), as well as database schema modeling,
DDL generation, and reverse engineering facilities.
For further information, see http://www.magicdraw.com.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 21
4.1 Starting MagicDraw™ with E2E Builder
The Builder is a pure Java application, which is fully integrated into MagicDraw. It enables you to create and compile UML
diagrams into executable (Web) services.
The Builder features a modular design and comprises the E2E Model Compiler for compiling XMI files, E2E Embedded
Server to run and debug services, and the E2E Analyzer for testing and analyzing deployed E2E Composite Services.
After installing MagicDraw and E2E Builder, you are ready to start with the Builder education project.
After the Builder has been installed, you can open MagicDraw by using the shortcut on the desktop.
As an alternative, you can also open it from the Windows Start Menu (MagicDraw UML).
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 22
4.2 Opening an Existing E2E Builder Project
This chapter describes how to open existing Builder projects like the E2E Examples. After opening MagicDraw, the new
E2E Builder menu item is visible in the menu bar.
You can open an existing Builder project in different ways:
Via menu item E2E Builder > Open E2E Builder Project.
Via menu item File > Open E2E Builder Project.
Alternatively, click the Open E2E Builder Project icon .
Note: Do not select the Open Project menu item in the File menu of MagicDraw, as this would not open a Builder
project.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 23
Click E2E Builder > Open E2E Builder Project.
If you have chosen the default settings for the E2E Documentation while installing the Builder, navigate to the
documentation folder C:\E2EBridgeDocumentation_5 and open the sub folders E2EBuilderProjects\E2EExamples.
Note: E2E Examples are part of the E2E Documentation and provide many UML models explaining basic and
advanced modeling concepts, adapters, etc. These examples are covered in the E2E Reference Guide.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 24
Open folder E2E Action Language.
Choose an existing Builder project. For instance,
open the example project Array.
Note: E2E Builder projects are marked
with the E2E icon .
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 25
In this dialog, you can choose a UML model,
which is part of the selected Builder project.
Note: When you open the same Builder
project next time, the Builder will open the
last UML model you worked on directly
without showing this dialog.
UML models of a Builder project are stored in the
project's uml folder. This folder can be organized
in further subfolders.
Select the XMI file arrayCount.xml.
This example shows the usage of the Array operation count(). You could compile, deploy, and run this example directly.
These steps are covered in more detail within this lesson.
Close the UML model by choosing File > Close Project. If you switched between UML diagrams, MagicDraw will ask you to
save the model, as it also stores the information about the diagram that was viewed last.
Click No to not save the UML model.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 26
5 Introduction to the Development Process
The first step of requirement analysis is to establish the business case for the system and to delimit the projects scope.
You need to identify all external entities, with which the system will interact (actors). The nature of this interaction is
defined at a high level (use cases).
The use cases are broken down to the lowest level of activities by implementing the business logic in activity diagrams. All
entities like data structures and backend systems are considered in those diagrams.
At the end, one document contains the implementation and documentation, making the maintenance and understanding of
the interfaces much easier.
Working with UML, developers, designers, and business analysts have the same visualized “code” base and can easily
work together, because everybody uses the same document and has an actual state of specification, implementation, and
documentation at any time.
Below you find the steps of the design process:
1. Use cases (roles and their activities)
2. Classes (static data structure)
3. Web service interface (port type definition for modeling the interface with its operations)
4. Activities (choreography, system behavior, backend adapters)
5. Sequences (system behavior)
6. Components and deployments
7. Compilation of UML models with the E2E Model Compiler
8. Debugging and testing the services with the E2E Interactive Debugger and the E2E Analyzer
9. Deployment of E2E composite services to an E2E Server
After completing and saving the UML model, it is stored in XMI format. After compilation of the UML model, the composite
service repository is deployed to a physical E2E Server node instance as defined in the deployment diagram. For each
deployed composite service, a Bridge Server process will be created at startup. The service is ready to be used by client
applications, for instance via the SOAP interface in case of a Web service.
The next chapters describe the UML models created during the development process.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 27
5.1 Use Cases
The use case view models the functionality of the system as perceived by outside users, which are called actors. A use
case is a coherent unit of functionality expressed as a transaction among actors and the system. The purpose of the use
case view is to list the actors and use cases, in order to show which actors participate in each use case.
Use cases can also be described in various levels of detail. They can be factored and described in terms of other, simpler
use cases. A use case is implemented as collaboration in the interaction view (e.g. sequence diagrams).
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 28
5.2 Classes
A class is the description of a concept from the application domain or the application solution. It is a static view, which is
displayed in a class diagram. Classes are drawn as rectangles and contain attributes and operations. A class can also be
used with other diagrams.
Relationships among classes are drawn as paths connecting class rectangles. The different kinds of relationships are
distinguished by line texture and by adornments on the paths or their ends.
A class can be described at various levels of precision and concretion. In the early stages of design, the model captures the
more logical aspects of the problem. In the later stages, the model also captures design decisions and implementation
details like the mapping from backend data structures to frontend data structures. Most of the views have a similar
evolutionary quality.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 29
5.3 Web Service Interface
A port type is the interface of a Web service. In this context, an interface describes a class with operations that are
accessible from the outside world via SOAP calls.
A port type is a specialized class. This model element is labeled with the stereotype <<E2ESOAPPortType>>. This
specialized class contains the operations of the Web service interface.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 30
5.4 Activities
Activities are helpful in understanding the high-level execution behavior of a system. The behavior is defined in activity
diagrams, which contain action nodes and control flows that show sequence dependencies.
An action node is drawn as a rectangle with round corners and represents an activity: a workflow step or the execution of
an operation. Control flows are drawn as arrows between the action nodes. They can have guards with logical expressions
that evaluate to true or false. A decision node is displayed using a rhombus symbol. Depending on which guard evaluates
to true, the flow follows the corresponding transition.
The input and output parameters of an action can be depicted by using object flows connecting an action node and an
object node.
Activity diagrams are also useful for modeling parallel processes because they show, at which point they need to be
synchronized.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 31
5.5 Sequences
A sequence diagram shows a set of messages arranged in a time sequence. Each classifier role is shown as a lifeline –
that is, a vertical line that represents the role over time through the entire interaction. Messages are shown as arrows
between lifelines. A sequence diagram can show a scenario, which is an individual history of a transaction.
One use of a sequence diagram is to show the behavior sequence of a use case. When the behavior is implemented, each
message on a sequence diagram corresponds to an operation on a class or an event trigger on a transition in a state
machine.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 32
5.6 Components and Deployments
A component and deployment diagram represents the physical view. Physical views model the implementation structure of
the application itself, such as its organization into components and artifacts and its deployment onto runtime nodes.
The component view models the components in a system, or the software units from which the application is constructed.
In the component diagram, you define the model elements of a service like components, classes, and interfaces, which are
manifested in artifacts. An Artifact defined by the modeler represents a concrete element in the physical world. It is the
specification of a physical piece of information that is produced by the E2E Model Compiler. The most important artifact in
the context of the Bridge is the repository file generated by the Model Compiler. The repository is deployed to an E2E
Server.
Deployment diagrams define the execution architecture of systems that represent the assignment of software artifacts to
nodes. A particular instance (or ‘copy’) of an artifact is deployed to a node instance. A node instance is a runtime resource,
like a computer or a device.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 33
6 Creating a Web Service
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 34
6.1 Assignment
The aim of the E2E Bridge® Education is to create a Web service that is drawn with the UML editor MagicDraw, compiled,
and finally deployed to the Server. Your Web service will be used by an Excel client.
The final Web service will perform a product query upon a user's search request. The creation of this Web service is
divided in three milestones, one milestone per lesson.
In the first lesson, you will learn the handling of MagicDraw, E2E Builder for MagicDraw (including the E2E Model Compiler
and the Interactive Debugger) and the E2E Embedded Server.
While practicing with these tools, you will design a first UML example. The milestone of the first lesson is to create a Web
service that returns an input string to an Excel client where it is displayed in upper case in a title field.
In the second lesson, you will extend the example and learn further features and functions. The goal of this lesson is to
create a Web service that receives data entered in an input mask of an Excel client. The Web service processes the data
and returns it back to the client, where it is displayed in the spreadsheet. In this lesson, the E2E Analyzer, which allows you
to test services, is introduced.
In the third lesson, you will extend the example again and use an E2E adapter to read and query an XML file. You will also
implement a call to an external Web service to request exchange rate data. The milestone of the third lesson is to model a
Web service that receives a search request tat the user has sent from an Excel client. The requested items are searched in
an XML data source file. The Web service returns the search results to the Excel client.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 35
6.2 Using E2E Builder
You have learned to open an existing Builder project in the previous chapter. To start with lesson 1, you will create a new
Builder project.
6.2.1 Creating a new Builder Project
Click E2E Builder > New E2E Builder Project.
Alternatively, you can choose File > New E2E
Builder Project.
The New E2E Builder Project dialog will open asking you to configure the Builder project settings.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 36
Set the Project Name to Education.
Continue with setting the Builder project path.
Click the ... button to open the E2E Builder
Directory Chooser dialog. Click the Create New
Folder icon to create the top level folder
E2E Builder Projects. This will be the container
for your E2E Builder projects.
Select this folder and click OK .
You can optionally enter an author name and a
project description.
Now, switch to the General tab.
The Repository Directory is set by default. All
repositories of compiled XMI files of the
current Builder project will be stored in this
path. The repository path will be discussed
later again as of testing the service.
Do not change the default path that contains
the Builder project path.
Switch to the tab Model Compiler.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 37
All UML models (XMI files) you create in this
Builder project will be stored in the UML Sources
path.
If you have purchased a dedicated E2E Server,
compiled composite services are deployed by the
Console defined on this dialog. In this example
this is the Console on services.e2e.com that is
listening on port 8080.
Click OK.
For detailed information about these settings, consult the E2E Builder User Guide.
The settings are valid for the Builder project Education. All XMI files of a Builder project are in reference to the Builder
project settings. You may change the project settings at any time by choosing the menu items E2E Builder > Settings. All
actions that are executed afterwards will be based on the new project settings.
Note: Be careful if you change the UML Sources path, because you will lose the references to XMI files that were
stored in the old UML source path. If you change the Project Name or the project path (Save Project in) on the
Project tab, references to XMI files stay intact, but related files will be moved to the new Builder project location.
The next screen will offer you to create a new
model or to import an existing model.
Select the option Create New E2E Model and
click OK .
The E2E model template contains several pre-defined UML elements that are necessary to create integration services with
the Bridge. It also provides a default package structure for your services and a frontend SOAP interface as a starting point.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 38
The XMI file is not yet saved in the Builder
project. The file name BuilderUML.xml is
suggested.
Note: By default MagicDraw offers you to save the XMI file in an unpacked format (XML Files (*.xml)), which is
necessary if you need to store the model's version number of your source control system in the UML model. This
would not be possible with binary formats. You can also choose to save it in packed XML format. In this case, change
the file type to Zipped XML Files (*.xml.zip).
Replace the file name BuilderUML with
lesson1.
The file will be saved in the default folder uml
of the Builder project Education you have
created before.
Click OK .
The XMI file lesson1.xml containing the UML model has been saved in the Builder project Education and is already opened
in MagicDraw. The activity diagram Implementation of Operation 1 is displayed as shown in the picture below.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 39
Note that in the blue MagicDraw title bar the name of the Builder project is displayed in brackets: [Education]. It is followed
by the name of the currently opened UML model file lesson1.xml (shown with full path).
6.2.2 E2E Builder Tools
Select E2E Builder > Views. This menu provides menu items to open and close the Messages window and the E2E Model
Compiler.
Note: The Views menu is only enabled if you have opened a Builder project before.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 40
The E2E Model Compiler menu item is
currently active (the Model Compiler is
displayed on the lower left side).
In general, the Model Compiler should not be
closed. However, if it was closed for some
reason, you can open it again with this menu
item.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 41
The Model Compiler window (with the tab
Deployment View selected) is still empty,
because you have not defined any deployments
yet. Its functionality will be explained later on in
the context of service components and
deployments.
On the lower right side, the E2E Messages Window is displayed. Whenever the Builder writes messages to it, it will be
opened automatically. It displays status messages, the result of compilation, and other important messages.
You can close the window at any time by clicking X in the upper right corner in order to gain more room for the diagram
pane.
In order to re-open the E2E Messages Window,
select E2E Builder > Views > Messages from
the main menu or press Ctrl - Shift - M .
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 42
Another way to open the Messages Window is
selecting Module > Messages from the Model
Compiler menu.
Now, close the E2E Messages Window.
6.2.3 Navigating in UML Diagrams
On the upper left side, you can see the structure of the UML model you just saved. This structure is called containment tree
and will be discussed step by step during the lessons.
On the lower left side, you can use the Zoom
tab to navigate in UML diagrams. This is, for
instance, helpful for class diagrams having a lot
of classes. Click the area surrounded by the
blue frame and keep the mouse buttons
pressed while moving it to the desired position
in the activity diagram (drag and drop).
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 43
By clicking the blue frame you can resize and
zoom into and out of the activity diagram on the
right side (diagram pane).
6.2.4 Diagram Info
In UML diagrams, you can display a diagram info box in the upper right corner containing the diagram name, the author
who created the diagram, creation and modification date, a short documentation, and a todo field. The todo content is
searchable in MagicDraw.
In order to switch on or off the diagram info, click the right mouse button in the diagram to open the context menu. Then,
select Show Diagram Info.
6.2.5 MagicDraw Projects Versus E2E Builder Projects
In MagicDraw, all UML models respectively XMI files are called project. You can open them without having E2E Builder
installed via the File > Open Project menu.
Working with the Bridge, all UML models, which belong to your software project, are organized within a Builder project,
which has its own settings. To work with Bridge models, you need to open a Builder project first in order to edit, compile,
and deploy the contained UML models. All models are located in the uml folder of the Builder project.
In the blue title bar of the MagicDraw window, the name of the currently opened Builder project is displayed in brackets
[Education], followed by the path of the currently opened model.
In the Opened Projects toolbar, you can see all UML models (XMI files) currently opened in MagicDraw.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 44
If this toolbar is not displayed yet, enable it via View > Main Toolbars > Opened Projects. Alternatively, you can right-click
into the toolbar area and select Opened Projects.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 45
6.3 Use Cases
You will now start to draw a use case according the previously described assignment.
Note: In most cases, use case diagrams are not required by the Model Compiler, but are very important to document
your service. When implementing a secured service, which allows accessing SOAP operations only if the user
successfully authorized himself, actors and use cases are considered by the Model Compiler for these purposes.
In MagicDraw on the left, you find the containment tree, which has a pre-defined structure containing UML elements. The
folders in the containment tree are called packages.
Expand the package Data / Overview in the
containment tree by clicking on the plus sign,
and select the package Use Cases.
You will now start drawing an overview use case
diagram describing the Web service.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 46
6.3.1 Creating the Use Case Diagram “Product Query Overview”
Open the context menu by clicking the package Use Cases with the right mouse button. Select New Diagram > Use Case
Diagram as shown in the picture below.
A new use case diagram will be opened with the default name Untitled1 shown in the containment tree on the left. The
diagram name is in editing mode, so you can just enter the new name Product Query Overview and press the Enter key.
The empty use case diagram created by you is shown on the diagram pane. If you want the diagram info to be shown,
select Show Diagram Info from the diagram's context menu. For more details see chapter Diagram Info.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 47
Note: All manipulations like adding new UML elements or modifying existing UML elements are marked in blue in
the containment tree, until you save the XMI file.
You will now draw the UML elements of the main use case diagram.
As discussed before, the use case view models the functionality of the system as perceived by outside users, which are
called actors. You will start to define the project scope of the product query in the main use case diagram, which will
contain one use case at the beginning. The use case will represent the “business” goal of this first lesson according the
previously described assignment.
An Excel client will be used to pass the actor’s input to the Web service you will define now. The Web service will pass
back its response to the Excel client, which will present the data to the actor.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 48
Select the Actor symbol from the diagram
toolbar with the left mouse button.
Move the mouse over the use case diagram and click again. The actor will be placed on the diagram pane as shown in the
picture below.
Double-click the actor symbol. In the upcoming dialog, enter Consumer in the Name field and click Close .
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 49
The actor’s name Consumer is now displayed with the actor symbol.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 50
Consumer is the first element of the use case
diagram and is also displayed in the
containment tree on the left.
In the next step, define the first use case, which
describes the functionality of the Web service
you will create in the first education lesson.
Select the Use Case symbol from the diagram
toolbar.
Move the mouse over the use case diagram and click again. A use case symbol will be placed on the diagram pane.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 51
Double-click the symbol and name it Define
Title.
Click Close .
The use case diagram now contains two elements: the actor Consumer and the use case Define Title.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 52
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 53
In the next step, you will define the association
between the actor and the use case.
Associations indicate that an actor is involved in
the interaction of a use case.
Select the Association symbol from the
diagram toolbar.
Move the mouse cursor over the actor, which will
be surrounded by a blue activation frame. Then,
click the actor symbol and …
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 54
… move the cursor over the use case. When the
use case is surrounded by a blue frame, click
again. The association between the actor
Consumer and the use case Define Title will be
drawn in the use case diagram.
Alternatively, you can also click the actor
Consumer and choose the symbol Association
from the Smart Manipulator Toolbar. Directly
move the mouse cursor over the use case and
draw the association.
Note: Drawing relations by the help of the smart manipulator toolbar is supported for all UML elements in any
diagram type. This method is the most efficient way and offers only relation symbols that are valid for the chosen
UML element (e.g. Include or Extend relations are not possible for an actor in use case diagrams, therefore they are
not offered).
The overview use case diagram describing the first step of the Web service is finished.
Save the file lesson1.xml.
Note that the color of the new elements in the
containment tree change from blue to black.
6.3.2 Creating the Use Case Diagram “Define a Title”
The next task is to model the functionality of the Web service that meets the objectives of the first education lesson. The
required interaction will be documented in another use case diagram called Define a Title.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 55
Select the package Data / Overview / Use
Cases as shown in the picture on the left.
Click the package Use Cases with the right
mouse button, and select New Element >
Package from the context menu.
Enter the name Define Title Service.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 56
Click the package Define Title Service with the
right mouse button, and select New Diagram >
Use Case Diagram from the context menu.
A new use case diagram will be opened with the default name Untitled1. Change the name to Define a Title.
Alternatively, it is possible to change the name
by opening the use case diagram specification
dialog via its context menu Specification.
Enter the new name in the Name field.
You have just created a new use case diagram. It is shown in the containment tree on the left.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 57
In the next step, you will draw the use case of your first Web service. As discussed in the beginning of this lesson, the Web
service will take a string as input, convert it to upper case, and pass the string as output to an Excel client.
You will use the same actor as in the use case
diagram Product Query Overview. Select the
actor Consumer.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 58
You will reuse the actor, because it is always the
same one that will take part in all following
actions.
Select Consumer with the left mouse button,
keep the button pressed, drag it to the diagram
pane, and drop it.
As you reuse the actor from the package Data / Overview / Use Cases, it will not be copied to the package Data / Overview
/ Use Cases / Define Title Service in the containment tree.
Next, you will draw a use case. Select the use case icon from the diagram toolbar and drop it onto the diagram pane. Right
after doing this, the use case it is in the editing mode. Start entering the name Define Title and confirm the entry by
pressing the key combination CTRL Enter or by clicking outside this use case. This is the most efficient way to name a use
case. If the use case does not accept your typing, try to re-select the UML element.
Note: As you type object names with the method described above, you
have the possibility to use the MagicDraw's suggestion feature. It is
especially useful if you like to reuse UML elements in other diagrams.
You can trigger the suggestions by pressing the key combination CTRL
Space or CTRL Backspace once you are in edit mode (see example on
the left).
Draw a second use case and name it Enter Title.
Draw a third use case and name it View Title.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 59
Now, you will define an association between the actor Consumer and the use
case Define Title.
Use the smart manipulator toolbar that appears when you select the actor
symbol. Click the association symbol and drop it onto the use case Define Title.
Enter Title and View Title are two use cases that are part of the use case Define Title. Therefore, you will connect them
using an Include relation.
You have the choice of either using the Include symbol in the diagram toolbar or
in the smart manipulation toolbar.
Note: Depending on the UML element type (e.g. actor or use case), the
options in the smart manipulation toolbar differ.
Note: MagicDraw prevents making wrong connections e.g. using an include
relation to make a connection from an actor to a use case. If a connection is
not possible, the object's activation frame is displayed red.
Now, select the include relation from the diagram toolbar and move the mouse over the use case Define Title. When the
blue frame appears, click it.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 60
Move the mouse over the use case Enter Title. When the blue frame appears, click again. Note, that the relation will be
labeled with the stereotype <<include>>.
Draw another include relation between the use cases Define Title and View Title.
The use case diagram is now containing three use cases Define Title, Enter Title, and View Title that are also visible in the
containment tree. The actor Consumer was reused from the use case diagram Product Query Overview.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 61
All relations (one association and two includes) can be found in the containment tree. MagicDraw allows you to jump from a
UML element of the diagram pane to its location in the containment tree.
Right-click the association between actor Consumer and use case Define Title and select Select in Containment Tree from
the context menu.
The association is highlighted in the containment tree. If you expand this node, two association ends will be displayed. They
have no names, but their types are displayed behind the colon (Define Title and Consumer).
Note: You can display the fully qualified types by clicking the icon Show Fully Types in Browser at the top of the
containment tree.
Open the Association specification dialog by
double-clicking the Association node in the
containment tree.
You will notice that the elements Define Title and Consumer are assigned to association end A and B. You optionally may
enter names for each end of the association. This will provide more advanced search possibilities in complex use case
diagrams.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 62
Save the UML model.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 63
6.4 Classes
In the education example lesson1.xml, you only work with base types (strings) and do not define any classes (complex
types). So there is no need to draw a class diagram.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 64
6.5 Port Type
All “public” Web services, which clients may access, must have an interface, in other words: a port type definition. A port
type accumulates operations that a client can call on a Web service. In the UML model, port types will be designed by using
a class stereotyped as port type. It is a special kind of class called port type, which has no attributes but only operations.
Each operation must be assigned to its implementation (a UML activity diagram). Operations of a port type represent the
interfaces of a Web service. Activities implement the behavior of these operations.
More details about port types and operations are described in the E2E Reference Guide.
In the next development step, you will define the SOAP interface of the Web service. In this lesson, we use Excel with its
SOAP toolkit to call the SOAP operations of the Web service. You could use any other SOAP client as well.
Within a Web service, one or more services can be included. Each service can have one or more port types. Within a port
type, one or more operations having input and/or output parameters can be defined. They are the interface to the outside
world.
6.5.1 Renaming the Packages
The model lesson1 was created on basis of the E2E model template. Therefore, a default service package is already part of
the model.
The package Data / Services in the
containment tree contains services with
relevant UML diagrams that will be part of a
deployable unit - a composite service. Adding a
SOAP interface to it, it becomes a Web service.
Expand the package Data / Services, and click
NameOfService1 with the right mouse button.
Select Rename from the context menu.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 65
Rename the package to GetTitleService and
press the Enter key in order to confirm the
change.
Packages on this level in the containment tree
will contain class diagrams, activity diagrams,
and port type definitions.
Expand the package GetTitleService and rename
the package NameOfPortType1.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 66
Type in the name Ports.
6.5.2 Defining the Port Type
A port type, an operation with one parameter, and a default activity implementing the port operation are already defined in
the UML model, as they were part of the E2E model template, from which this model has been created.
You will rename the port type and add mandatory documentation for it.
Open the package Data / Services /
GetTitleService / Ports and expand the port
type class NameOfPortType1.
Below the port type class, you find the
operation operation1 and its implementation,
the activity Implementation of Operation 1. We
recommend storing the implementation of an
operation always below the corresponding class
node in the containment tree.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 67
Expand the package Ports and rename the port
type NameOfPortType1.
Type in the name GetTitlePortType.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 68
Documentation for port types and its operations is
required by the WSDL standard, therefore the
Model Compiler will check for it.
In order to enter the documentation of the port
type, open its specification dialog. Click the pre-
defined port type GetTitlePortType with the right
mouse button and select Specification in the
context menu.
Click the entry Documentation / Hyperlinks in the
left panel end replace the text [Add
documentation here] in the Documentation panel
on the right with the following description:
The port type provides an operation to copy a
string and convert it to upper case. That string is
used as title in the client application.
Click Close .
The documentation will be displayed upon
mouse-over on the containment tree element.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 69
6.5.3 Defining the Operation
You have introduced the name of the interface (port type) in the model. The next step will be to define the capabilities of the
Web service. As you already know, the Web service will be capable of taking a string (Title) from the actor, converting it to
upper case, and passing this string (Title) back to the actor. This service behavior is exposed to the outside world with an
operation.
In the next step, you will define this operation in the model.
Open the specification dialog of the pre-defined
operation operation1 with the right mouse
button, and select the menu item Specification
from the context menu.
Rename the operation to getTitle in the Name
field.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 70
Operations need to be documented – this will be
verified by the Model Compiler. The
documentation text will be inserted into the
WSDL file of the composite service repository,
from where possible users of the service can get
this information.
Click the entry Documentation/Hyperlinks in the
left panel end replace the text [Add
documentation here] in the Documentation panel
on the right with the following description:
The operation defines an interface to copy a
simple string, convert it to upper case and return
it to the client application.
Click Close .
6.5.4 Defining the Operation Parameters
The Web service will be capable of taking a string (Title) from the actor and passing this string (Title) back to the actor. In
the next step, you will specify the operation parameters: one input parameter (inputTitle) and one output parameter
(outputTitle).
First, you will define the input parameter.
Expand the operation getTitle. Right-click the
pre-defined operation parameter parameter1
and select Specification from the context menu.
The Parameter specification dialog opens.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 71
Rename the parameter to inputTitle and select in
from the pull-down menu Direction, as this
parameter is only used as input to the operation.
The parameter type is already set to base type
String.
Click Close .
The operation now has an input parameter but is
still missing the output parameter.
Right-click the getTitle operation and select New
Element > Parameter.
The new parameter node in the containment tree
is in edit mode. Name the parameter to outputTitle
and press the Enter key.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 72
Double-click the new operation parameter
outputTitle to open its Parameter specification
dialog.
Click into the Type field and start typing Str on the
keyboard to filter the list. Select String [Base
Types] with the arrow keys and press Enter .
Note: Always make sure to select the E2E base types and not the types that are part of the UML standard profile (see
String [UML Standard Profile...] in the Type field.
As this parameter is the output parameter of the
operation, select out from the pull-down menu
Direction.
Note: If a parameter is used as input and
output at the same time, choose inout.
Click Close .
6.5.5 Assigning the Activity Diagram to the Operation
At this point, the interface of the Web service is nearly complete.
Each operation must be assigned to an activity diagram of the UML model. Operations of a port type represent the
interfaces of a Web service. Activity diagrams implement the behavior of these operations. Each port type operation has to
be assigned to the implementing activity diagram.
In the E2E model template you have used to create this UML model, the assignment has already been done for the default
operation.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 73
To check the assignment, select the operation
getTitle in the containment tree with the right
mouse button and choose Behavior Diagram >
Assign….
All diagrams that can be assigned will be listed in
the dialog. The button Assign is not enabled,
because the activity diagram Implementation of
Operation 1 is already assigned to the operation.
Close the dialog by clicking the Close button.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 74
You can verify the assignment in the containment
tree, as the operation specified by the activity is
displayed within brackets behind the activity
name (as shown in the picture on the left).
Whenever you double-click the operation getTitle,
the assigned activity diagram will be opened in
the diagram pane.
The Web service interface has been finished now. If the operation getTitle is called remotely, the actions will be executed
as defined in the assigned activity diagram.
Save the UML model.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 75
6.6 Activities
In UML, activity diagrams are used to model the behavior of operations, classes, or use cases. This chapter describes how
activity diagrams are used to model the behavior of operations. Activity diagrams describe actions that shall be executed in
a specific order (control flow) and how data is being transformed (object flow).
There are several types of actions. For the implementation of operations, the Bridge supports the following kinds of
activities:
Actions are used to describe actions applied to objects or the environment. They may contain so-called action
scripts, or can be stereotyped signaling a special kind of an action. For instance, <<SQLAdapter>> actions apply
actions to SQL databases.
Call Behavior Actions give a link to other activity diagrams. Therefore, it is possible to decompose the behavioral
logic into smaller units of activities.
Call Operation Actions can be used to call class operations encapsulating specific behaviors.
Besides designing the control flow with actions, there are objects that are part of defining an object flow in an activity. An
object flow models the flow of values to or from object nodes. Objects may be input and output of single actions, or input
and output of activities.
6.6.1 Activities and Activity Diagrams
An activity ( ) is created upon creation of an activity diagram ( ). It is containing all UML elements that are used in
the activity diagrams of this activity. An activity can have several activity diagrams, each of them representing a special
view on the activity (for instance, error handling could be placed in a second activity diagram). However, in this course, only
one activity diagram per activity is defined.
You will start by renaming the pre-defined activity and activity diagram.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 76
Expand the activity node Implementation of
Operation 1 in the containment tree and
rename the activity.
The name of the activity respectively the activity
diagram should always correspond to the name
of the operation it is specifying.
Assign the name Get Title.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 77
Note: The corresponding activity diagram
has been renamed as well by MagicDraw.
Double-click the activity diagram in the containment tree in order to open it. The predefined activity diagram already
contains some UML elements in the diagram pane.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 78
Each activity diagram needs a starting point called initial node. The initial node icon defines the start of the activity behind
the operation of a port type. An activity final node defines the end of an activity. In the predefined activity diagram, the two
nodes are already connected with a control flow.
Initial Node and Activity Final icons can be
found in the diagram toolbar.
6.6.2 Adding Parameters to the Activity
An object is an instance of a class. It stores data that can be modified within activities. Objects may originate outside of the
context of an activity – in other words, they are input parameters to the activity. On the other side, activities may produce
objects that are used as output. Output objects can be used as input of another action within the same context (the same
activity diagram), or they can be passed as output parameters to an outside context, which can be a calling activity or a port
type operation.
In the following steps you will define the input and output parameters of the activity implementing the port type operation
getTitle. These parameters must have the same name, type, and direction (in, out, or inout) as the operation parameters.
The most efficient way is to copy the parameters in the containment tree from the operation node to the activity node.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 79
Open the operation getTitle in the containment tree
and select the two parameters intputTitle and
outputTitle.
Next, hold down the Ctrl key of your keyboard and drag
the two parameters over the activity node. Holding down
the Ctrl key tells MagicDraw to make a copy of the
parameters instead of moving them from the operation
node to the activity node. A +-sign attached to the cursor
arrow indicates the copy action.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 80
Release the mouse button when the activity node Get
Title is active. MagicDraw will create an exact copy of the
operation parameters within the activity.
Note: Using this method not only copies the
parameter names, it also copies all the parameter
properties like type and direction.
Now, you will add the two parameters to the activity diagram in the diagram pane to model the object flow. For this
purpose, UML elements called Activity Parameter Nodes are used. Each activity parameter node works as container of a
parameter. When they are drawn in the activity diagram, they have a different color than normal object nodes to indicate
that these nodes contain activity parameters.
In order to visualize if an activity parameter node contains an input or an output parameter, you can place them on the left
or right side of the diagram frame. The left side corresponds to input, the right side to output.
The diagrams frame is the surrounding border
in the diagram pane and holds the name of the
activity diagram. If it is not displayed, it can be
made visible via the context menu item Show
Diagram Frame.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 81
When copying the parameters from the operation
to the activity, you may have noticed that two
activity parameter nodes have been created
automatically (see highlighted area on the left).
They have the same names as the corresponding
parameters.
Select the parameter inputTitle in the
containment tree.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 82
As it is an input parameter, drag the selected
parameter to the left border of the diagram frame
until the diagram frame gets surrounded by a
blue rectangle.
Release the mouse button.
Note: Although you were dragging the
parameter and not the activity parameter
node from the containment tree,
MagicDraw placed the activity parameter
node on the activity diagram. You could
have taken the activity parameter node as
well.
The input activity parameter node has been
drawn in the activity diagram and shows the
name and type of the parameter it is containing.
On the right side of the colon, the type of the
parameter (String) is displayed.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 83
Now add the output parameter to the activity
diagram.
Select the parameter outputTitle in the
containment tree.
As it is an output parameter, drag the selected
parameter to the right border of the diagram
frame until the diagram frame gets surrounded
by a blue rectangle.
Release the mouse button. The output activity
parameter node has been drawn in the activity
diagram and is displaying the name and type of
the parameter it is containing.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 84
6.6.3 Designing the Control Flow
Initial node, activity final node, and the two activity parameter nodes inputTitle and outputTitle have been defined so far, but
no action node yet.
You will now add an action to the activity
diagram by selecting the Action icon from the
diagram toolbar.
The most efficient way to insert an action node in
an existing control flow is to drag it onto this
control flow, which will be split by MagicDraw
automatically without the need to reconnect the
initial node, the action node, and the activity final
node manually.
Drag the action node onto the control flow, which
connects the initial node and the activity final
node. As soon as you move the +-sign of the
cursor over the control flow, the blue helper grid
line appears. Release the mouse button to insert
the action node.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 85
In the following dialog, click the button After
Control Flow.
The action node is now integrated into the control
flow. You can place any action with the described
method into control flows.
Double-click the action node to open its
specification dialog.
Name the action Get Title and close the dialog.
This action currently does nothing. Before you add action script to the action in order to implement some behavior, you
need to complete the object flow.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 86
6.6.4 Designing the Object Flow
Object flows capture how objects participate in activities and how they are affected by the activities. Objects or data are
passed along the object flow.
In activity diagrams, object flows are represented by slightly thinner lines than control flows. They model the flow of values
to or from object nodes. Object nodes may be input and output of single actions, or input and output of activity diagrams.
The object inputTitle is input of the activity (the input parameter is passed from the caller of the activity diagram -
the assigned port type operation). The object inputTitle will also be the input of the single action Get Title.
The object outputTitle will be the output of the action Get Title. The object outputTitle is also output of the activity
diagram (the output parameter is passed to the caller of the activity diagram, which is the assigned port type
operation).
You will now connect the objects inputTitle and outputTitle with the action Get Title.
Select the Object Flow icon from the diagram
toolbar.
Move the mouse cursor over the activity
parameter node inputTitle and click it when the
blue activation frame appears.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 87
Move the cursor over the action node Get Title
and click it to connect the object flow.
Now, the object flow connects the activity
parameter node and the action node. The
direction of the arrow indicates that the action
node receives the input string inputTitle.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 88
Now you will draw the other object flow from the
action node Get Title to the output activity
parameter node outputTitle.
Select the Object Flow icon from the diagram
toolbar.
Move the mouse cursor over the action node Get
Title and click it when the blue activation frame
appears.
Move the cursor over the output activity
parameter node outputTitle and click it as soon
as the blue activation frame appears.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 89
Drawing the object flow in this direction indicates
that the action creates the output string
outputTitle.
The object is passed to the caller of the activity
diagram, which is the assigned port type
operation.
The action Get Title currently does nothing. In the next step, you will add action script to the action in order to implement
some behavior.
Save the UML model.
6.6.5 Using E2E Action Language
For implementing behavior in actions, the Bridge provides the E2E Action Language (EAL), which implements parts of the
Action Semantics UML Extensions. This language is used in a script like fashion in the action script part of the actions. The
E2E Action Script Editor supports the E2E Action Language and helps you to quickly create syntactical correct action script
statements.
Remember that the Web service will take a string as input and pass the output back to the client. In the next step, the
action Get Title will “learn” how to transform the input string to upper case and how to assign it to the output object by
using action script.
Click the action node Get Title with the right mouse button, and select the menu item E2E Action Script Editor in the context
menu.
Note: If the action node is already selected, you can also press the Ctrl - Enter keys to open the editor. The
functions and short cuts of the editor are described in more detail in the E2E Builder User Guide.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 90
The E2E Action Script Editor dialog opens.
Note: The Action Language is case
sensitive. Every statement must end with a
semicolon.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 91
Operations, functions, and macros of the action
language are displayed in blue.
To create the action script statement, start by
typing the set assignment statement. After
adding a space, all objects that are available for
the action node will be listed.
Click the entry for the object outputTitle in order to select it. Alternatively, use the arrow keys to mark it and press the
Enter key to select it.
Note: The Action Script Editor only suggests objects that are connected to the action node through object flows.
Therefore, it is recommended to complete the object flow before editing the action script.
After selecting the output object, a space and an
equal sign (=) are added automatically to the
statement. Press the End key to jump to the end
of the line and press Ctrl - Space to open the
suggestion list again.
Select the object inputTitle by clicking it or
pressing the Enter key.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 92
All letters of the input string need to be converted
to upper case. This will be done by using the
toUpper() operation of the base class String. As
the object inputTitle is of type String, the Action
Script Editor will provide all possible operations.
Type ".". The suggestion list containing all
attributes and valid operations for object inputTitle
will appear.
Type "t" to filter the suggestion list and select
method toUpper() using the arrow keys and the
Enter key. This operation requires no
parameters.
Note: The Action Script Editor displays operations in italic.
Note: All possible operations of the E2E base types (String, Integer, Float, DateTime, Boolean, Blob, Array, and Any)
are described in the E2E Reference Guide.
Every action script statement needs to be ended
with a semicolon (;).
The statement for assigning the value of the
converted input object to the output object is
completed.
Click the OK button or press Ctrl - Enter to save
the action script and close the editor.
Note: Suggestion lists or warnings that pop
up in the Action Script Editor can be closed
by pressing the Esc key.
Often, it is helpful to describe what the statements will do. You can comment one or more lines for this purpose. Each
comment line in the action script is preceded by two slashes (//).
Note: The action script is now shown in the tagged value script of the action node Get Title. The stereotype
<<ActionScript>> was applied to the action node as well. In E2E Builder, all tagged values are assigned to
stereotypes. The tagged value script belongs to the stereotype <<ActionScript>>.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 93
If you double-click the action node Get Title,
the action's specification dialog will open.
The action script statement you just entered in
the Action Script Editor is shown in the Script
field. You could also enter or modify the action
script here. However, no help is provided to
create syntactical correct action script
statements. Furthermore, no suggestion lists
are displayed, which help you to enter action
script quickly.
Save the UML model.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 94
6.6.6 Creating Notes
Often it is necessary to annotate the activity diagram with notes in order to document the control flow, describe the
activities, or enter other useful information.
The note can be used for text based documentation. You can also apply HTML formatting to the text you entered.
Select the Note icon from the diagram toolbar
and place it somewhere in the activity diagram.
The note is already in editing mode. If not, switch
to editing mode by clicking into the note.
An HTML toolbar floating above the note is activated. You can use it to format text or create hyperlinks to other diagrams in
the UML model.
Write a descriptive text into the field, e.g. This
activity uses an action to traverse an input
string to an output string, converting it to
upper case.
Press Ctrl - Enter or click outside the note to
leave the editing mode.
If Autosize is switched on, you can switch off
the autosize feature in the context menu of the
note, if you want to resize it manually (you may
need to expand the context menu to see all
menu items).
Use the shape handles to resize the note, then.
By using anchors, you can attach the note to any
UML element in the activity diagram.
Select the Anchor icon from the smart
manipulation toolbar of the note. You can use this
icon for any UML element in the activity diagram.
Move the anchor over the UML element you want
to attach the note to. When the blue activation
frame appears, click to connect the anchor to the
UML element.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 95
The note is now connected to the action node with
a connecting line (anchor).
As shown on the left, the tagged value script is
displayed in the lower compartment of the note.
Note: If you edit the action script statement
with the Action Script Editor, the script in
note will be updated automatically. You
could also edit this tagged value directly
within the note.
You can stop showing tagged values in the note by
deselecting the option Show Tagged Values in its
context menu.
Save the UML model.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 96
6.7 Sequences
In the next modeling step, you will draw a sequence diagram documenting the Web service. A sequence diagram is a time-
oriented view of the interaction between objects. An interaction may be modeled at any level of abstraction within the
system design, from subsystem interactions to instance-level interactions for a single operation or activity.
The sequence diagram has two dimensions: the vertical axis represents time, while the horizontal axis represents
participating objects. Horizontal ordering of the objects is not vital to the operation, so you may rearrange them as
necessary.
The sequence diagram is optional and will not be considered by the E2E Model Compiler as it is used for documentation
purposes only.
In the containment tree, expand the package Data / Overview / Use Cases, select the package Define Title Service, and
open its context menu. Select New Diagram > Sequence Diagram.
The sequence diagram will be created. In the containment tree, it is wrapped in an Interaction, a unit of behavior. The
interaction is part of a Collaboration, which represents how elements of the UML model cooperate to perform an essential
behavior.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 97
The name of the sequence diagram is in editing
mode. Start typing Define Title and press Enter .
Note that the owner nodes (interaction and
collaboration) have been renamed as well.
The sequence diagram Define Title is now
included in the package Use Cases.
The actor Consumer in package Data / Overview /
Use Cases is part of the process and can be
directly used in the sequence diagram.
Select the actor Consumer.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 98
Drag the actor from the containment tree onto the
diagram pane.
The first Lifeline is created.
The actor Consumer uses the Web service, which
is accessible via the SOAP interface. You can use
the port type GetTitlePortType in the sequence
diagram as well.
Select the port type class GetTitlePortType in
package Data / Services / GetTitleService / Ports.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 99
Drag GetTitlePortType onto the diagram pane and
drop it next to the lifeline Consumer.
The interaction is designed by using messages
that are exchanged between the lifelines.
In the next step, draw the call message, which is
sent by the actor Consumer.
Select the Call Message icon from the diagram
toolbar.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 100
Move the mouse cursor over the consumer's
lifeline and click when the blue frame appears.
Move the mouse cursor over to the lifeline of the
port type. When the blue frame appears, click
again to draw the message.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 101
You have now created a call message from actor
Consumer to port type GetTitlePortType. Now, you
need to specify, which operation is called on the
port type.
Select the call message and open the Message
specification dialog via the context menu.
Define the Operation by selecting the operation
getTitle from the drop down list.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 102
Next, click Arguments in the left panel of the
dialog.
The argument list shows two arguments, which correspond to the input and output parameters of the port type operation.
Both are having default values (-), which will not be changed as no specific values need to be entered for this message.
Since you only pass inputTitle as parameter to the SOAP operation, you can delete the argument outputTitle.
Click the second argument (parameter outputTitle)
and delete it by clicking the Delete button on the
lower right corner of the dialog.
Close the dialog window.
The call message has been defined. The actor is
calling the port type operation getTitle and is
passing the input parameter inputTitle.
In the next step, you will draw the reply message
from port type GetTitlePortType back to the
service consumer Consumer.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 103
Select the Reply Message icon from the diagram
toolbar.
Draw the reply message from the lifeline of the
port type to the lifeline of the actor.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 104
Double-click the return message to open the
Message specification dialog.
Enter return in the Name field.
Now, you will assign the output parameter
outputTitle.
Click Arguments in the left panel of the dialog.
Then, click the Create button.
A list showing all possible argument types
appears.
Select Element Value.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 105
The Select Element dialog window opens showing
the content of the containment tree.
Enter outputTitle in the search field. Select the
operation parameter outputTitle from Data /
Services / GetTitleService / Ports /
GetTitlePortType / getTitle and click Ok .
The parameter is displayed in the argument list
now.
Close the Message specification dialog.
The sequence diagram should look like in the picture below.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 106
Save the UML model.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 107
6.8 Component and Deployment Diagram
In the next modeling step, you will define the physical implementation of the Web service. Optionally backends can be
defined that the service may need to connect to fulfill requests.
6.8.1 Component Diagram
A component diagram defines how components are wired together to form larger components or software systems. In
context of the Bridge you define composite services that are deployed to an E2E Server. In lesson 1 this is a Web service
containing a SOAP interface. All model elements of the component diagram like components, classes, and interfaces are
manifested in artifacts. Artifacts represent concrete elements in the physical world. The most important artifact in the
context of the Bridge is the repository file (see artifact EducationLesson1 below, stereotyped as
<<E2ECompositeDeployment>>). The repository is generated by the Model Compiler and contains the composite service
defined here.
The example below shows the component diagram of lesson 1.
For each artifact in the component diagram you can define certain settings that are a service needs in order to run
properly. For the SOAP service artifact, for instance, these are the protocol and the port used by the service.
There could be several artifacts manifesting the same component, e.g. a development artifact and a test artifact, both with
different settings, but in most cases there will be only one artifact for each component.
6.8.2 Deployment Diagram
Deployment diagrams define the execution architecture of systems and represent the deployment of (software) artifacts to
(hardware) nodes. A node is a runtime resource, defined by an IP address resp. DNS name, like the machine localhost
shown in the picture below.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 108
A particular instance of a component artifact - in this case EducationLesson1 - is deployed to a node instance, which
means that the composite service repository including definitions of required backends are copied to this specific machine.
Once you completed the component and deployment diagrams and compiled the composite service, you can deploy it to an
E2E Server. According to the example above, the executable composite service EducationLesson1 will run on node instance
localhost.
The Builder provides two wizards, the E2E Components Wizard and the E2E Deployment Wizard, both supporting you with
the task of creating all required components, artifacts, and instances. In the following steps, you will specify components,
port types, and artifacts in the component diagram and the execution architecture in the deployment diagram by using the
Components Wizard and the Deployment Wizard.
6.8.3 E2E Components and Deployment Wizard Overview
The E2E Component Wizard helps you to define all components, classes, interfaces, artifacts, and dependencies that are
needed to build a complete component diagram. It guides you through all necessary steps and supports you with the
customization of all artifacts.
The Deployment Wizard helps you to define the execution architecture of the system. Specify, which instance (or ‘copy’) of
an artifact is deployed to which node instance.
Once the component and deployment diagrams have been defined, you can deploy the compiled composite service to the
server.
Both wizards work the same way, they are separated into two panels. On the left, the Tree panel shows defined
components, artifacts, or deployment information. It is updated with each step and provides an overview of the UML
elements that will be drawn when finishing the Components or Deployment Wizard. You can select an element node in the
tree to continue defining elements from this point. In the Customization panel on the right, all required UML elements are
defined and customized.
The pictures below show the starting dialogs of the Components Wizard and the Deployment Wizard.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 109
Each dialog of the Components or Deployment Wizard provides different buttons. Some buttons are only enabled if a
required previous step has been completed.
Button Description
> Defines an artifact that manifests the selected component or makes a selection of certain elements.
< Removes the selected element.
New Defines a new component, class, or interface.
Next Continues with the next step.
Skip This button is enabled, if it is possible to skip some steps (however, if you defined frontend, backend,
or proxy services, they need to be completed). You may continue with the definition of backends,
proxies, or dependencies. It may also be possible to directly finish the wizard and confirm to draw the
component or deployment diagram.
Finish Closes the Components or Deployment Wizard and draws all defined elements in the component or
deployment diagram. This button is only visible in the last step.
Cancel Quits the Components or Deployment Wizard and discards all elements that were defined since
starting with the first step.
6.8.4 Using the E2E Components Wizard
The Components Wizard creates artifacts that will be deployed to nodes. Therefore, you need to create the component
diagram first before defining the deployment diagram.
Select the menu icon E2E Components Wizard in the MagicDraw toolbar to start. You can also start the wizard from
the Model Compiler menu Tools > Components Wizard.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 110
The Components Wizard dialog window opens.
In the first step, you are prompted to enter the
name of the component diagram. Name it
EducationComponents.
Click Next to proceed to the second step.
In the second step, you will define both the
composite service component and the
corresponding artifact. The composite service
component will be manifested in the composite
service artifact. The artifact represents the
repository of the Web service and will contain all
necessary configuration information.
Note: The composite service represents the unit that will be compiled to an executable service. The output of the
compilation is a repository (the composite service artifact), which will be deployed to localhost later.
Click New to create a new composite service component and artifact.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 111
In the following dialog, you will create the
composite service artifact. The Components
Wizard will create the corresponding
component automatically.
Name the artifact EducationLesson1. In the
field Control Port, enter 20011 (the value needs
to be between 20’000 and 29’999). The E2E
Console uses the control port to control a
deployed composite service.
Note: The E2E Console provides comprehensive features to manage services with a Web-based user interface. It is
part of E2E Server that can be purchased separately as Development, Test, or Production Server. The development
environment contains an embedded E2E Server and does not provide a Web-based user interface.
The service composite artifact name EducationLesson1 is also used to manage the composite service in the Console.
This name will appear in the navigation pane of the Console of a development, test, or production Server.
In the next step, you will define an advanced setting. Switch to the tab Advanced.
If many composite services are deployed and
managed in the Console, it makes sense to
categorize them. Composite services belonging
to the same category are grouped together in
the navigation panel. On the Advanced tab of
this dialog you can define the category.
Enter the category E2E Education and click OK .
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 112
The steps until this point define the composite
service component EducationLesson1 (see left
side) and the composite service artifact having the
same name on the right side. This will be drawn
in the component diagram EducationComponents.
The composite service artifact EducationLesson1
manifests the composite service component also
named EducationLesson1.
In the customization panel, you will find the new
composite service component EducationLesson1
on the left side, and the composite service artifact
EducationLesson1 on the right side. Later, the
latter will be deployed to the node instance
localhost.
Click Next .
Note: The left side of the customization panel contains components, classes, or interfaces. The right side always
contains the artifacts, which are displayed bold and underlined.
In the next step, you define the frontend service
that will be part of the composite service. Now,
create the service artifact. The Components
Wizard will create the corresponding service
component automatically.
Note: On the left side of the customization panel, a pre-defined UIRepositoryArtifact is displayed. It is only required
when you want to define graphical user interfaces, which is not in scope of this education lesson. As it is not needed,
do not select it (a selection would be done by moving the artifact to the right side).
Click New.
All possible frontend service stereotypes are displayed:
E2EEventObserverService
E2EHTTPService
E2EJavaService
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 113
E2ESAPRFCService
E2ESchedulerService
E2ESOAPService
E2ETimerService
If you want to import Java classes into the UML model, you could also define a Java Virtual Machine by selecting the
corresponding template.
As you model a Web service, you need to select
the service stereotype E2ESOAPService.
Click OK .
Customize the service artifact and name it
GetTitleServiceArtifact. The Protocol of the SOAP
service is http (default). Set the Port number to
10011, to which the SOAP service is listening (the
value needs to be between 10’000 and 19’999).
Click OK.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 114
Now, in the component diagram the service
component GetTitleService Component is placed
within the service composite component
EducationLesson1. The service artifact
GetTitleServiceArtifact is place within the
composite service artifact EducationLesson1 and
manifests the service component GetTitleService
Component.
In the customization panel on the right, you will
find the new service artifact
GetTitleServiceArtifact.
Click Next .
In the next step, you will define the interface of
the SOAP service. Through this interface, the Web
service is accessible from the outside world.
You already defined a port type class in chapter
Port Type. The Components Wizard lists the port
type (GetTitlePortType) on the left. Select it and
click the button > to create the port type artifact.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 115
In the following dialog, define the port type artifact
and name it GetTitlePortTypeArtifact, which is the
default name suggested.
Click OK.
In the component diagram, the port type class
GetTitlePortType is placed within the service
component GetTitleService Component. The port
type artifact GetTitlePortTypeArtifact is placed
within the service artifact GetTitleServiceArtifact
and manifests the port type class
GetTitlePortType.
In the customization panel on the right, you will
find the new port type artifact
GetTitlePortTypeArtifact.
As an interface can only get manifested once by
an artifact, the port type GetTitlePortType is not
displayed anymore in the SOAP Port Types list on
the left.
You have now completed the frontend of your
Web service. First, you defined the composite
service, then the SOAP service, and finally the
SOAP interface.
Click Next .
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 116
In the Customized Artifacts tree of the tree panel,
the composite service artifact is selected again, to
give you the option to define further frontend
services. As you do not need any further
elements, click Skip .
All necessary components and artifacts have
been defined. As you do not define any backends
or proxies in lesson 1, choose the option Finish to
continue with the last step.
This is the final step of the Components Wizard.
You need to confirm drawing the component
diagram.
Click Finish .
If components and artifacts are not complete yet,
you may select an element node in the tree panel
and add further UML elements to the diagram.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 117
As of changing the component diagram, some
data needs to be reloaded by the Model Compiler.
Click Yes to refresh the deployment data and
save the UML model.
The component diagram will be drawn in MagicDraw. The model will be saved as well.
The generated component diagram EducationComponents will open.
The generated component diagram does not look very neatly. The Quick Diagram Layout functionality of MagicDraw helps
you to rearrange the diagram.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 118
Click the little arrow next to the Quick Diagram
Layout icon in the upper diagram
toolbar.
Select the menu item Route Paths Orthogonal
Style.
MagicDraw reroutes the paths in the diagram.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 119
The defined components and artifacts are saved
in the package Data / Component View.
In the containment tree, expand this package. You
will find all components and artifacts you defined
with the Components Wizard, except the port
type class that was created in another package.
In the Deployment View of the Model Compiler, the
XMI file lesson1.xml is displayed.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 120
Expand the XMI file lesson1.xml to unhide the
composite service EducationLesson1 and open its
context menu. It cannot be compiled or deployed, as
the deployment diagram has not been created yet.
Therefore, the menu items in the Compile menu
and in the context menu are disabled.
The component diagram models the components in a system, or the software units from which the application is
constructed. You will now proceed with the creation of the deployment diagram.
6.8.5 Using the E2E Deployment Wizard
Deployment diagrams define the execution architecture of systems that represent the assignment of software artifacts to
nodes. A particular instance (or ‘copy’) of an artifact is deployed to a node instance. A node instance is a runtime resource,
like a computer or a device.
In the E2E Model Compiler window, select the
tab Deployment View, and expand the tree.
Note that the composite service
EducationLesson1 is defined within the model
lesson1.xml.
In the next step, you will define a deployment for the composite service EducationLesson1. Start to create the deployment
diagram with the help of the Deployment Wizard. Click the menu icon Deployment Wizard from the MagicDraw
toolbar to open the wizard. You can also start the wizard from the Model Compiler menu Tools > Deployment Wizard.
Note: The icon is only enabled, if you have completed the component diagram.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 121
The Deployment Wizard dialog window opens.
You want to deploy a particular instance (or
‘copy’) of the composite service artifact
EducationLesson1. It is already chosen and
cannot be changed, as it is the only composite
service defined in the model.
in the first step, you are prompted to enter the
name of the deployment diagram. The name
will also be used to manage different
deployments and will be taken for the name of
the repository file that is generated during the
compilation of the composite service.
Enter the name EducationDeployment and click
Next to proceed to the next step.
In this step, you will define an E2E Server node instance, to which the composite service will be deployed. You can select a
predefined node artifact and add a node instance to the deployment diagram. The Deployment Wizard provides several
node types to create a new node instance (Windows, Linux, AIX, Oracle Solaris, HP-UX, and a platform-neutral description
E2EBridgeServer). They classify the type of server you are using.
Note: In this step, the left side of the customization panel lists node type and can also list node instances that already
exist in the UML model. The right side lists node instances you have chosen in order to deploy a composite service
artifact to it. Node instances are always displayed bold and underlined.
Select E2EBridgeServer and click > to create a
new node instance.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 122
In the following dialog, define the name of the
physical machine (node instance). This can be
either the IP-address, the DNS name, or localhost
(default).
Keep localhost and click OK.
After finishing the Deployment Wizard, the node
instance localhost will be drawn in the
deployment diagram. The artifact instance (the
copy of the artifact EducationLesson1) will be
deployed to it.
After clicking OK, you will return to main dialog of
the Deployment Wizard. On the right side of the
customization panel, the node instance localhost
is displayed. When you expand localhost in the
tree panel on the left, the composite service to be
deployed is displayed as well.
Click Next .
This is the final step of the Deployment Wizard.
You need to confirm drawing the deployment
diagram.
Click Finish .
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 123
As of changing the deployment diagram, some
data needs to be reloaded by the Model Compiler.
Click Yes to refresh the deployment data and
save the UML model.
The deployment diagram EducationDeployment will be generated and opened in the diagram pane.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 124
The defined node and artifact instances are
saved in the package Data / File View. Expand
this package in the containment tree. You will
find the package EducationDeployment, which
contains the deployment diagram
EducationDeployment you just defined.
In the deployment view of the Model Compiler,
expand the tree of the composite service
EducationLesson1. The deployment
EducationDeployment you just defined can now be
compiled and deployed to the Server.
Note: There could be various deployments created for the composite service EducationLesson1. You could do this, for
instance, if you defined different backend systems for a testing and a productive environment. A test deployment and
a production deployment could then be compiled and deployed separately.
The Web service is done now. The next chapter explains how to compile the deployment EducationDeployment.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 125
7 Compilation
The next step is to compile the finished composite service to an executable Web service that can be deployed to the server.
First, you need to examine the settings. Make sure you have opened the Model Compiler window (via the menu items E2E
Builder > Views).
Expand the entry lesson1.xml. The composite
service EducationLesson1 will be visible. If you
expand this node, you will see the deployment
you created for this service.
Select the deployment EducationDeployment
and open the menu Compile from the menu bar.
You will find a detailed description about all
menu items in the E2E Builder User Guide.
If the option Save Before Compilation is not selected, the Builder will ask you to save an unsaved XMI file before compiling
it. If the option is selected, the Builder always saves an unsaved XML file before a compilation without asking you.
The menu items Compile and Deploy can be used for each deployment of a composite service.
Clean All deletes the repository files of all local versions of compiled composite services in the repository directory of the
current Builder project and all files in the working directory.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 126
In the next step, you will compile the
deployment for composite service
EducationLesson1. Select the deployment
EducationDeployment with the right mouse
button and select the menu item Compile
"EducationDeployment" in the context menu.
Alternatively, you can open the context menu of
the composite service EducationLesson1 and
select the menu item Compile Deployments. In
this case, all existing deployments of the
composite service would be compiled.
It is also possible to use the menu item Compile > Compile in the menu bar or the short cut F9 . However, you need to
make sure that the correct entry is selected in the Model Compiler.
The following window indicates that the Model
Compiler is compiling the composite service to an
executable Web service that can be deployed to the
Server.
During compilation the model is being syntax checked and the repository, including the WSDL file of the service, is
generated. The repository can be found in the Builder project directory named repository.
If no error in the UML model is found, the
deployment node turns green. You successfully
compiled your first UML model to an executable
service.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 127
It could be possible that the example was not compiled without errors. In this case, the deployment node
EducationDeployment would have turned red. In the following chapter, it will be explained, how to solve such a problem.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 128
7.1 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. In the following example, we introduced an error in the model on purpose.
Switch to the activity diagram Get Title and edit
the action script of the action node Get Title
with the E2E Action Script Editor.
Change the operation in Get Title from
toUpper() to toupper().
The Model Compiler will report an error, as it
does not know the operation toupper().
Operations of the E2E Action language are case
sensitive.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 129
Save the UML model and compile it again.
When you start the compilation without saving the model, the Model Compiler will ask you if you want to save the changes.
In this case, click Yes .
In the Compile menu of the Model Compiler, you can switch on Save Before Compilation. Then, the Model Compiler will
automatically save all changes before compiling.
The Model Compiler shows all error messages in the E2E Messages window.
The error message is also displayed in the tree
of the deployment view below the deployment
of the composite service.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 130
Double-click the error in either the Messages
window or the Model Compiler window.
This will highlight the package or the UML
element in the containment tree of MagicDraw
where the error occurred.
The error occurred in the action ( ) Get Title.
If the activity diagram containing the erroneous
action is not opened yet, you can either double-
click the entry of activity diagram Get Title in
the containment tree or the parent node of the
action, which is the activity Get Title.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 131
The activity diagram Get Title is displayed in the
diagram pane.
For a better overview, close the Messages
window. You can always reopen it if necessary via
E2E Buider > Views or the shortcut Ctrl - Shift -
M .
Correct the name of the toUpper() operation.
Re-compile the deployment
EducationDeployment. You can either select
Compile "EducationDeployment" in the Model
Compiler window ...
... or select Re-compile EducationLesson1 from
the context menu in the Messages window.
If you closed the Messages window you can
reopen it with Ctrl - Shift - M .
After correcting the action script statement to toUpper() the Model Compiler will not report any errors anymore. In the
Model Compiler, the color of the compiled deployment has changed from red to green.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 132
If you find no way to fix possible other problems in your lesson 1 model, you can use the solution model of lesson 1 as a
reference.
Open the Builder project E2E Education (default
location C:\E2EBridge- Documentation_5\
E2EBuilderProjects).
Select the Builder project and click OK.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 133
As you have not opened this Builder project
before, the E2E Builder File Chooser pops up.
Select the file lesson1.xml in sub folder uml, which
contains all reference models of this course with
complete solutions.
Note the title bar of MagicDraw. It displays the
name of the now active Builder project E2E
Education in brackets (see highlighted area).
The solution models of lesson 1 to 3 are listed in
the Deployment View of the Model Compiler. Open
the model lesson1.xml by double-clicking it.
Note: By opening lesson1.xml from Builder project E2E Education your own project Education is no longer the active
Builder project, though your own XMI file lesson1.xml is still kept open within MagicDraw. If you want to continue to
work with the Builder project Education, you have to reopen the Builder project.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 134
You can compare the solution model with your
model to find the error.
You can switch between open model files using
the Opened Projects toolbar of MagicDraw.
Now, return to your own model. Close the solution
model 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.
In the Deployment View of the Model Compiler,
your model file lesson1.xml is visible again.
As an alternative, you can continue the work with the solution model by importing it directly into your own Builder project.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 135
Select the menu item Import > XMI File in the
Model Compiler.
In the File Chooser, change to the folder of the
Builder project E2E Education (default location see
above) and double-click the folder uml.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 136
Choose lesson1.xml, as you want to import the
solution model of lesson 1 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.
lesson1_solution.xml and click OK.
The imported model will be listed in the
deployment view of the Model Compiler. You could
compile this model and continue with it to the end
of lesson 1.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 137
8 Testing with E2E Interactive Debugger
The E2E Builder allows you to test all operations of a service at runtime in a model based fashion. You can not only test
and trace synchronous calls to a service but also asynchronous threads, for instance such of time triggered events or
asynchronous tasks of a persistent state engine.
The Builder provides different ways of how to test and trace a service. One possibility is to record the execution path of a
service call. The E2E Analyzer can request the recorded trace information from the Server and display the information
graphically as UML sequence and activity diagrams. The execution path and all runtime values can be analyzed by the
user.
Another possibility is to debug the models at runtime. The E2E Interactive Debugger allows you to set breakpoints in the
activity diagrams of the UML models. You can step directly into each action of an activity diagram within MagicDraw and
examine the executed action script and runtime values of all objects.
In lesson 1, the E2E Interactive Debugger is introduced. The E2E Analyzer will be subject of lesson 2 and 3.
For detailed information see the E2E Builder User Guide.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 138
8.1 Running the Service
You will now test the Web service.
First of all, you will start the service, run a test case, and check the response the service returns. After that, you will debug
the service step by step.
On the left side of the EducationDeployment
node the little gear wheel icon shows whether
the service has been started or not. E2E Builder
contains an embedded Server, to which the
compiled service repository gets deployed
automatically whenever you start the service.
Currently, the gear wheel is gray , because the service is stopped. Click the deployment EducationDeployment with the
right mouse button and select Run "EducationDeployment" from the context menu.
Another window opens that contains several tabs to administrate and test the service. This window is called the Runtime
window. As it has been placed at the bottom of the MagicDraw window, you should reorganize the window layout.
We recommend placing the Runtime window as additional tab next to the E2E Messages tab. First, make sure the message
window is opened (shortcut Ctrl - Shift - M).
Click the tab labeled with lesson1.EducationLesson1. EducationLesson1 as shown in the picture below. Drag it...
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 139
... over the title bar of the message window and release the mouse button as soon as the message window is surrounded
by a gray border.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 140
The window layout is stored individually for
each model.
The Runtime window contains five tabs: Preferences, Run, Debug, Remote Debug, and Test Cases.
In the Preferences tab, the settings of the service (particularly the settings defined in the model) can be edited. The Run tab
serves to start and stop the service and to view the service log. The Debug and Remote Debug tab contain debugging
functionality. In the Test Cases tab, test cases can be specified and run.
You will use the Debug tab as well as the Test Cases tab in the following chapters. For further information on the Runtime
window refer to the E2E Builder User Guide.
As you started the service, the Run tab has
been opened. It shows all messages of the start
up procedure of the service. If the service start
up has been successful, the last line reads Start
up done.
In summary, the following tasks have been executed automatically after clicking Run in the Model Compiler.
1. If the model had been changed, it would have been compiled as well.
2. The service composite has been deployed to the E2E Embedded Server.
3. The service has been started spawning a Bridge server process.
The service is ready to process service SOAP requests. Using the embedded Server, divergent deployments defined in the
deployment diagram is ignored - the service will always be deployed to the Embedded Server (localhost).
Note, that the gear wheal in the Model
Compiler has turned green , indicating that
the service is running.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 141
8.2 Running a Test Case
In the next step, you will run a test case and check the response the service returns.
In the Runtime window click Open Test Case .
The Runtime window switches from tab Run to tab Test Cases, which contains the E2E SOAP Test Tool. With this tool, you
can edit SOAP requests of defined test cases that will be sent to the service. The returned SOAP responses can be viewed
as well.
On the left panel, you find a tree with entries representing the WSDL definition of the service. On the right panel, you will
find the SOAP requests and SOAP responses of selected test cases.
The following items are displayed for each
WSDL definition:
1. identifier of the WSDL definition
(deployed composite service)
2. name of the service
3. name of the port type
4. name of the operation
5. name of the test case
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 142
When you start a service in the Embedded Server, the SOAP Test Tool imports the WSDL from the service repository and
creates a test case automatically. The SOAP requests and responses will be stored with the test case on disk, so they are
not lost when you close MagicDraw.
The test case getTitle has been created automatically and is displayed next to a gearwheel . The gearwheel in gray color
indicates that this test case has not yet been run.
The SOAP Test Tool contains a Request and a Response tab in the right panel of the window. Now, define the request that
should be sent to the service.
In the Request tab, click inputTitle a first time to select it, and a second time to edit it. Enter an input string as shown in the
picture below and press Enter . Remember, this will be the title displayed in the Excel client later. The string object
inputTitle is the input parameter of the operation getTitle as defined for the port type and implemented in the activity
diagram.
Click the test case getTitle with the right mouse button and select Run Test Case.
Running a test case means that the SOAP Test Tool sends a SOAP request containing the defined input data to the service
hosted by the Embedded Server.
After successful execution of the test case, the gearwheel color changes to green. The SOAP Test Tool switches to the
Response tab and shows the results. The input title has been returned in uppercase.
If the gearwheel is displayed in red, a runtime error has occurred.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 143
Two new tree entries below the test case getTitle are displayed. They represent the request and response logs containing
the SOAP messages the SOAP Test Tool sent and received.
When clicking the entry request.log in the tree, an additional tab Request Log opens and displays the request SOAP
message that has been sent to the Web service.
When clicking the entry response.log, the Response tab opens and displays the result that the Web service has returned to
the SOAP Test Tool.
It is also possible to create multiple test cases for a single operation. Each test case can be run with individual input
values.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 144
Further test cases can be created by selecting
Create Test Case from the context menu of the
operation getTitle.
Now stop the service running in the Embedded Server. This will stop the corresponding Bridge server process.
You can do this in two ways.
Either switch to the Run tab in the Runtime
window and click the stop icon .
Or stop the service by selecting Stop
"EducationDeployment" in the context menu of the
deployment in the Model Compiler.
This can also be done in the Model Compiler
menu Run if the deployment is selected.
After stopping the service the gearwheel in the Model Compiler window turns grey again.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 145
8.3 Debugging the Service
In this chapter, you will learn how to debug a service. The E2E Builder provides the E2E Interactive Debugger, which allows
you to debug a service step by step by setting breakpoints in the activity diagrams of UML models. You can step directly
into each action of an activity diagram within MagicDraw and examine the executed action script and runtime values of all
objects.
For debugging purposes, the service has to be started in debug mode.
Select the deployment of your service in
the Model Compiler and choose Debug
"EducationDeployment" from the context
menu.
After the Runtime window showed the service starting up, the Debug tab is displayed and the service is ready to be
debugged. Clicking will stop the service at any time, clicking will restart it in debug mode again.
Usually, you define a breakpoint on an action node in the activity diagram and start the test case in order to debug the
service. Then, you can step through the activities, look at object values, and trace errors.
Additionally, you can use the pause mode by clicking the pause button . The interactive debugger will pause the service
at the next possible point: if the test case has not been started yet, this means the very first action of the service. If the
service is already processing the request of the test case, clicking pause will lead to the service being paused at the next
possible action. This is especially useful, if the service is trapped in an endless loop.
You will now set a breakpoint in the activity diagram of your service. The interactive debugger will stop at the action where
you have set the breakpoint.
In the diagram pane switch to diagram Get Title.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 146
Right-click the action node Get Title and select Add Breakpoint from the context menu.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 147
Click in the Interactive Debugger toolbar to view all breakpoints that are set in the UML model.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 148
The Manage Breakpoints dialog displays a
list of all breakpoints. The check box in front
of each breakpoint indicates wether the
breakpoint is active or not.
Click OK to close the dialog.
Now, you need to start the test case in order to debug the service. Switch to the Test Cases tab, e.g. by clicking the button
Open Test Case in the toolbar and run the test case.
The Runtime window switches back to the Debug tab and shows the service being stopped at the first breakpoint. The
debug tab shines yellow and the action node, the breakpoint was added to, is marked in yellow in the activity diagram.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 149
The Watches/Script tab of the Interactive Debugger has two panels.
In the left panel, the operation currently being processed (getTitle()) is displayed. The interactive debugger stopped in the
implementation (activity diagram) of this operation. It stopped at the action node, where the breakpoint has been set (in the
first line of the left panel it reads Get_Title. Blanks in the action node name were replaced by an underscore "_"). Below
this action, its input and output parameters are displayed. Currently, the input string inputTitle having the value Price
Comparison is shown.
In the right panel, the action script statements of the current action are displayed. Currently, this is the set assignment
statement set outputTitle = inputTitle.toUpper();
The Interactive Debugger offers you the following possibilities to proceed:
Step into the action. The Interactive Debugger steps into the action and
stops directly before executing the next action script
statement.
Step over the actual action and continue with the next
action.
The Interactive Debugger executes all remaining action
script statements of the current action and stops at the
beginning of the next action.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 150
Go up the call stack to the calling action. The Interactive Debugger executes all remaining actions
of this activity diagram and returns to the calling activity.
It stops at the next action of this activity diagram.
Go to the next breakpoint. The Interactive Debugger continues the execution of the
model until it is stops at the next breakpoint.
In order to debug the action script of the current action, click Step Into.
Note, that in the right Script panel of the window the action script statement got highlighted. The Interactive Debugger will
execute the statement if you step into it.
Click Step Into once again.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 151
The Interactive Debugger executed the action script statement and has stopped at the activity final node End. This is
indicated in the first line of the Watches panel (getTitle:End).
The set statement has been processed and disappeared. In addition to the input parameter inputTitle, the Watches pane
shows the result of the action script execution, the output parameter outputTitle having the value PRICE COMPARISON.
Click Go To Next Breakpoint. As there are no further breakpoints defined, the test case will run to its end.
Switch back to the tab Test Cases.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 152
The Response tab shows the result of the request. The gearwheel is still green as during debugging no error occurred.
All breakpoints are stored within the Builder project. Debugging the service in another session, all breakpoints are still set.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 153
8.4 Using the Web Service with the Excel Client
After testing the composite service with the E2E SOAP Test Tool and the E2E Interactive Debugger, you are now going to
use the service with an Excel client.
The Excel client Client-lesson1.xls is provided
with the E2E Documentation. It is enhanced with
Visual Basic code that is able to communicate
with the Web service via the SOAP protocol.
Therefore, it is required to install the Microsoft
SOAP Toolkit as described in the E2E Builder
Installation Guide.
You will find the Excel spreadsheet in the documentation location (default location:
C:\E2EBridgeDocumentation_5\Documentation\pdf\E2E Education\Lesson1). Double-click the file to start the Excel
application.
As the spreadsheet is containing macros, Excel
throws a security warning. Click Options... and ...
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 154
... choose Enable this content in the appearing
window to be sure that the macro enhancements
will be loaded.
You may also open the Trust Center and add the
E2E Bridge Documentation folder (e.g.
C:\E2EBridgeDocumentation_5) and its subfolders
as a trusted location. Then Excel will not block
macros from E2E Bridge Documentation anymore.
Note: If necessary, you should adjust the security settings in Excel in order to allow running macros (e.g. in Excel
2007, see Macro Security in the Developer tab). Excel versions prior to Excel 2007 may show a Security Warning
window. Make sure you enable the macros in these versions.
In the Excel dialog that has been opened, you can enter a title and call the Web service.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 155
Check the E2E Composite Service URL that
specifies, on which node instance the
composite service is running.
Enter the title in the Title field.
Note that the E2E Composite Service URL must be correct as otherwise the service can not be accessed. If you used other
service names or a different port number, you have to change it here.
If your are not sure about the correct service path, you can compare respectively copy it from the test case properties.
Switch to E2E Builder to the Test Cases tab in the Runtime window.
Right-click on a test case and select Properties.
The Test Case Properties window pops up.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 156
Copy and paste the service location if
necessary.
Close the window by clicking Cancel .
Switch back to Excel.
Click >> Search << .
Microsoft’s SOAP client, embedded in Excel,
will call the Web service. The return value of
the Web service will be displayed as uppercase
title in the spreadsheet.
Close Excel.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 157
9 E2E Development Server and E2E Console
The development environment E2E Builder contains an embedded E2E Server to directly run and debug services. It does
not include the E2E Console, which provides comprehensive features to manage services with a Web-based user interface.
E2E Console is part of E2E Server that can be purchased separately as Development, Test, or Production Server. This
chapter lists the most important features of the E2E Console.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 158
9.1 Advantages of the E2E Development Server containing the E2E Console
Services that need to be shared: When you are developing services within a team, most times it is necessary to
share deployed services on a common infrastructure. For instance, one developer provides a basic service that is
needed by others for developing further services.
Proxies: Proxies are managed within the E2E Console.
History: Each managing action (changing settings, deployments, starting and stopping services, etc.) is listed in the
history of each service.
Static GUI: You can define static GUIs (for instance a statistics about a service) in the Console.
Managing of resources: Manage resources like schemas, Java archives, XSLT scripts, etc.
Deployment scenarios: The Console supports different deployment scenarios. For instance, a service deployed on
the Developer Server can be exported including its settings and preferences. Then, it can be deployed on a Test
Server.
Administration of several Servers within one Console: If several E2E Server are part of an E2E Server domain, all
servers can be managed within one Console.
Users and groups: You can set up a role model for users managing services in the Console.
Logging: The Console provides several logs to analyze the behavior of the system.
Monitoring: In the Console, it is possible to register high-availability monitoring services that observe all deployed
services and alert you upon errors.
If you have purchased am E2E Development Server, you can continue with the next chapters. Otherwise you can proceed
with lesson 2.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 159
9.2 Installation of E2E Server
Please refer to the Server installation guide. You will find the E2E Server Installation Guide on the E2E Bridge release CD
or as part of the documentation.
Double-click the file setup.exe of the Server and follow the instructions.
9.2.1 E2E Server Domains
An E2E Server domain is an aggregation of several E2E node instances. The advantages of domains are summarized as
follows.
Several node instances can be aggregated in one domain. Each composite service running on different node
instances can be managed from one Console installation. It is possible to deploy, start, and stop composite
services even if they run on other node instances within the domain.
User and group access rights are shared between each node instance that belongs to the same domain.
Domains enable you to setup flexible configurations, e.g. load balancing configurations.
The Console can manage multiple installations of itself (respectively E2E node instances) on different systems, if the node
instances are member of the same E2E Server domain. You may define an individual domain name, for instance
E2E_Education as shown below.
If you have not defined a domain name during the installation, you need to define it now. Refer to chapter Creating an E2E
Server Domain in the E2E Server User Guide.
Note: How to login into the Console to complete this task is also described in the E2E Server User Guide or in the
next chapter.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 160
9.3 Starting the E2E Console
With the Console, you can manage composite services running on a node instance.
Start a Web browser and enter the following
URL in the address field to access the Console:
https://<hostname>:8080/admin.
After entering the URL of the Console, the Web
browser will display a security alert, as the
Console runs with this self-signed security
certificate, whose name may not match to the
name of the site, or the certifying authority is
not known by the browser. As this is a default
certificate, always accept this certificate to run
the Console.
If using Internet Explorer 8 or higher, click the
second hypertext link Continue to this website.
If the Microsoft Phishing Filter dialog appears,
select the recommended default settings and click
OK.
The Certificate Error displayed is due to the
certificate issue explained before. It can be
ignored.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 161
Enter admin in the field User and the Password
you have chosen during the installation of the
Server.
Click Login .
If you are have problems connecting to the Console, check the proxy settings of your browser and make sure that the
proxy server is bypassed for the host you have chosen (see also chapter Troubleshooting in E2E Server User Guide).
After a successful login, a welcome screen is
displayed.
In the example shown on the left, the node
instance education.e2e.ch (on your system it
will be the host you have chosen) is listed in the
navigation panel. So far, no composite service
has been deployed to the Server.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 162
9.4 Installing the E2E License Key
Before a composite service can be started on the Console, the E2E Server license key has to be installed.
Select the node instance (here
education.e2e.ch) in the navigation panel on
the left. The preferences of the node instance
are displayed.
Expand the navigation item by clicking the plus-
sign. Two navigation items appear.
Click Bridge Server in the navigation panel.
Several tabs for defining Server settings and
administering other items are displayed.
Switch to the tab Licensing.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 163
Open the E2E license key file in an editor and
copy all content. Paste the key into the field
Install License and click the button Install
License .
After the installation of the license, the license
details are displayed.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 164
9.5 Deploying the Compiled Composite Service
Before deploying the compiled composite service, you first need to check the settings of the Builder project. Select E2E
Builder > Settings from the menu.
On the tab Model Compiler, you can check the
deployment settings of your project.
The field Deploying E2E Console Name
specifies the Console that executes the
deployment. It should be set to the host where
you have installed the Server.
The Deploying E2E Console Port should be set
to 8080. This value was defined during the
installation of E2E Server.
The Console User should be set to admin.
The options Run Composite Service after
Deployment and Overwrite Existing Composite
Service should be selected.
Select OK to close the window, return to the
Model Compiler window, and select the
composite service.
Click the right mouse button and select Deploy
“EducationDeployment”.
Note: The menu items Debug and Run
would implicitly deploy the composite
service to the Embedded Server.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 165
The next dialog asks you to enter a password. The Bridge addresses security issues and allows defining user and group
access rights. For instance, users may be refrained from deploying composite services (for more details see E2E Server
User Guide).
If you have not defined other users on the
Console, enter the user admin and the required
password and click OK .
The password was set during the installation of
the E2E Server.
The window shown on the left indicates that the
deployment process is in progress.
If the deploying Console name defined in the
Builder project settings does not match to the
domain name registered on the Console
certificate, the message shown on the left is
displayed. Click the Continue button to deploy the
composite service to the Server.
If the deployment was successful, the file name
and the composite service name will turn green.
If the deployment failed, then the name is
displayed in violet color.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 166
9.6 E2E Console
After you have logged into the Console for the first time, you deployed the compiled composite service. Reload the browser
window to see the change. As the Console session expires after approximately 30 minutes of inactivity, you may need to
log in again.
The main window of the Console is displayed.
Notice the Node Instances section on the left,
where one composite service is listed for node
instance education.e2e.ch (respectively the
name of your machine).
Expand the node education.e2e.ch in the tree.
Expand the entry Bridge Server and the category
E2E Education to see all deployed composite
services (here only EducationLesson1).
If many composite service are deployed and managed in the Console, it
makes sense to categorize them. Composite service belonging to the
same category are grouped together in the navigation panel. In the
example on the left, the composite service EducationLesson1 is
displayed below category E2E Education.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 167
Clicking the hypertext link Bridge Server, all
deployed composite services running on this
node instance will be displayed in the working
panel. You can start, stop, and delete them, and
view their logs by using the appropriate buttons.
To delete a composite service, you must first stop
it.
You can click the composite service
EducationLesson1 to view further information on
the tabs Composite Service, History, Logging,
Settings, Version, Persistent State, and User
Interface.
The Start button is disabled, if the composite
service is already running.
The composite service preferences can be
changed even when the composite service is
running.
If you would like to read a more about E2E Console, we recommend reading the E2E Server User Guide.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 168
9.7 Testing the Deployed Composite Service
Now you are ready to test the deployed composite service with the Excel client. Open the Excel client Client-lesson1.xls that
was provided with the documentation.
Education Lesson 1
© 2012 E2E Technologies | www.e2ebridge.com | 169
Check the E2E Composite Service URL that
specifies, on which node instance the
composite service is running. Replace localhost
with the name of the E2E Development Server,
to which you deployed the service.
Enter the title in the Title field and click >>
Search << .
Microsoft’s SOAP client, embedded in Excel, will
now call the Web service. As you changed the
composite service URL, the SOAP request is sent
to the E2E Development Server and not to the
embedded Server (localhost) anymore.
The return value of the Web service will be
displayed as uppercase title in the spreadsheet.
Close Excel.