Pal gov.tutorial3.session10.lab4

18
1 PalGov © 2011 1 PalGov © 2011 فلسطينيةلكترونية الديمية الحكومة ا أكاThe Palestinian eGovernment Academy www.egovacademy.ps Tutorial III: Process Integration and Service Oriented Architectures Practical Session (National Student Registry)

Transcript of Pal gov.tutorial3.session10.lab4

Page 1: Pal gov.tutorial3.session10.lab4

1PalGov © 2011 1PalGov © 2011

أكاديمية الحكومة اإللكترونية الفلسطينيةThe Palestinian eGovernment Academy

www.egovacademy.ps

Tutorial III:

Process Integration and Service Oriented Architectures

Practical Session(National Student Registry)

Page 2: Pal gov.tutorial3.session10.lab4

2PalGov © 2011 2PalGov © 2011

About

This tutorial is part of the PalGov project, funded by the TEMPUS IV program of the

Commission of the European Communities, grant agreement 511159-TEMPUS-1-

2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.ps

University of Trento, Italy

University of Namur, Belgium

Vrije Universiteit Brussel, Belgium

TrueTrust, UK

Birzeit University, Palestine

(Coordinator )

Palestine Polytechnic University, Palestine

Palestine Technical University, PalestineUniversité de Savoie, France

Ministry of Local Government, Palestine

Ministry of Telecom and IT, Palestine

Ministry of Interior, Palestine

Project Consortium:

Coordinator:

Dr. Mustafa Jarrar

Birzeit University, P.O.Box 14- Birzeit, Palestine

Telfax:+972 2 2982935 [email protected]

Page 3: Pal gov.tutorial3.session10.lab4

3PalGov © 2011 3PalGov © 2011

© Copyright Notes

Everyone is encouraged to use this material, or part of it, but should

properly cite the project (logo and website), and the author of that part.

No part of this tutorial may be reproduced or modified in any form or by

any means, without prior written permission from the project, who have

the full copyrights on the material.

Attribution-NonCommercial-ShareAlike

CC-BY-NC-SA

This license lets others remix, tweak, and build upon your work non-

commercially, as long as they credit you and license their new creations

under the identical terms.

Page 4: Pal gov.tutorial3.session10.lab4

Tutorial Map

Title T Name

Session0: Syllabus and overview 0 Aldasht

Sesson1: Introduction to SOA 2 Aldasht

Session2: XML namespaces & XML schema 2 Aldasht

Session 3: Xpath & Xquery 4 Romi

Session4: REST web services 3 M. Melhem

Session5: Lab2: Practice on REST 3 M. Melhem

Session 6: SOAP 2 Aldasht

Session 7: WSDL 3 Aldasht

Session8: Lab 3: WSDL practice 3 Aldasht

Session9: ESB 4 Aldasht

Session10: Lab4: Practice on ESB 4 Aldasht

Session11: integration patterns 4 M. Melhem

Session12: Lab5: integration patterns 4 M. Melhem

Session13: BPEL 3 Aldasht

Session14: Lab6: Practice on BPEL 3 Aldasht

Session15: UDDI 2 Aldasht

Intended Learning ObjectivesA: Knowledge and Understanding

3a1: Demonstrate knowledge of the fundamentals of middleware.

3a2: Describe the concept behind web service protocols.

3a3: Explain the concept of service oriented architecture.

3a4: Explain the concept of enterprise service bus.

3a5: Understanding WSDL service interfaces in UDDI.

B: Intellectual Skills

3b1: Design, develop, and deploy applications based on Service

Oriented Architecture (SOA).

3b2: use Business Process Execution Language (BPEL).

3b3: using WSDL to describe web services.

C: Professional and Practical Skills

3c1: setup, Invoke, and deploy web services using integrated

development environment.

3c2: construct and use REST and SOAP messages for web

services communication.

D: General and Transferable Skills

d1: Working with team.

d2: Presenting and defending ideas.

d3: Use of creativity and innovation in problem solving.

d4: Develop communication skills and logical reasoning abilities.

Page 5: Pal gov.tutorial3.session10.lab4

BizTalk Server 2010 Basic Configuration

• Install BizTalk Server on a Single-Computer

Environment

• In Microsoft BizTalk Server 2010 Configuration, select

Basic configuration.

• Under Database, type the name of the SQL Server.

• Under Service Credential, type the username and

password that the services will run under.

• Click Configure.

• On the Summary screen, review the configuration, and

then click Configure.

• On the Completion screen, click Finish.

Page 6: Pal gov.tutorial3.session10.lab4

Tutorial 1: Enterprise Application Integration

• Under the following link: http://msdn.microsoft.com/en-us/library/aa578030

• Lesson 1: Define Schemas and a Map

o Step 1: Create EAISchemas Project

o Step 2: Create the Inventory Request Schema

o Step 3: Create the Request Decline Schema

o Step 4: Create the Map

o Step 5: Build the EAISchemas Project

• Lesson 2: Define the Business Process

o Step 1: Add EAIOrchestration Project to the Solution

o Step 2: Define the Business Process

o Step 3: Add Ports to the Orchestration

o Step 4: Build the EAIOrchestration Project

• Lesson 3: Deploy the Solution

o Step 1: Deploy the Projects

o Step 2: Configure and Start the Application

o Step 3: Test the Solution

Page 7: Pal gov.tutorial3.session10.lab4

Lesson 1: Step1 & 2

• Step1: Create New Empty BizTalk Server Project.

– Name: EAISchemas.

– Location: C:\tutorial\Lessons.

– Solution Name: EAISolution.

– click Save All.

• Step2: Create the Schemas

– In Solution Explorer, right-click the EAISchemas project, point to Add,

and then click New Item.

– In the Add New Item - EAISchemas dialog box, do the following:

• Click Schema Files, then click Schema.

• Name: Request.xsd.

Page 8: Pal gov.tutorial3.session10.lab4

Add elements to the schema

1. In schema tree, click the Root node.

2. In the Properties pane, change the value of the Node Name to Request

3. In schema tree, right-click the Request node, point to Insert Schema Node, and then click Child

Record.

4. Type Header as the new name for the child record

5. Repeat step 3 and 4 to create a second child record for the Request node, and name it Items.

6. Right-click the Header node, point to Insert Schema Node, and then click Child Field Element.

7. Type ReqID as the new name for the element

8. Repeat step 6 and 7 to create a second child field element for the Header node, and name it

OrderDate.

9. Right-click the Items node, point to Insert Schemas Node, and then click Child Record.

10. Type Item as the new name for the child record

11. Right-click the Item node, and add the following child field elements:

1. Description

2. Quantity

3. UnitPrice

4. GrandTotal

12. Right-click GrandTotal, point to Promote, and then click Quick Promotions

13. Click save all.

Page 9: Pal gov.tutorial3.session10.lab4

Lesson 1: Step 3: create the Request Decline schema

1. Right-click the EAISchemas project, point to Add, and then click New

Item.

2. In the Add New Item - EAISchemas dialog box, do the following:

– Use this To do this Installed Templates

– Click Schema Files, and then click Schema.

– Name: RequestDecline.xsd.

3. Click Add.

4. In BizTalk Editor, from schema tree, click the Root node to select it.

5. In the Properties pane, change the value of the Node Name property to

DeclineReq, and then press ENTER.

6. In schema tree, right-click the DeclineReq node, point to Insert Schema

Node, and then click Child Field Element.

7. Type ReqID as the new name for the element, and then press ENTER.

8. Add a second child field element named GrandTotal.

9. On the File menu, click Save All.

Page 10: Pal gov.tutorial3.session10.lab4

Lesson 1: Steps 4&5: Create & Build the Map

• Create map that transforms Request message to RequestDecline message

• In Solution Explorer, right-click EAISchemas, and then click Build.

• To create the map

1. Right-click the EAISchemas project, point to Add, and then click New Item.

2. In the Add New Item - EAISchemas dialog box, do the following:

– Click Map Files, and then click Map. And Name : MapToReqDecline.btm.

3. Click Add.

4. In the Source Schema pane, click Open Source Schema.

5. In the BizTalk Type Picker dialog box, expand EAISchemas, expand Schemas, click

EAISchemas.Request, and then click OK.

6. In the Source Schema pane, right-click <Schema>, and then click Expand Tree Node.

7. In the Destination Schema pane, click Open Destination Schema.

8. Select EAISchemas.RequestDecline, and then click OK.

9. In the Destination Schema pane, right-click <Schema>, and then click Expand Tree Node.

10. In the Source Schema pane, drag the ReqID field to the ReqID in the Destination Schema pane.

A line appears connecting the two elements.

11. In the Source Schema pane, drag the GrandTotal field to the GrandTotal field in the Destination

Schema pane to map the data from one schema to the other.

12. On the File menu, click Save All to save your work. Right-click EAISchemas, and click Build.

Page 11: Pal gov.tutorial3.session10.lab4

Lesson 2: Step 1: Add EAIOrchestration

Project to the Solution

• Add another project to your solution

1. Add, New Project, do the following:

2. Click BizTalk Projects, and then click Empty BizTalk Server Project.

– Name : EAIOrchestration.

– Location :Type C:\BTSTutorials\EAISolution.

3. Click OK.

• Add an orchestration

1. In Solution Explorer, right-click EAIOrchestration, point to Add, and then

click New Item.

2. In the Add New Item - EAIOrchestration dialog box, do the following:

1. Click Orchestration Files, and then click BizTalk Orchestration.

2. Name: EAIProcess.odx.

3. Click Add.

Page 12: Pal gov.tutorial3.session10.lab4

Lesson 2: Step 2: Define the Business

Process

• Use Orchestration Designer to create the EAI business process workflow

1. In Solution Explorer, double-click EAIProcess.odx to open the orchestration.

2. In Orchestration Designer, from the orchestration Toolbox, drag the Receive

shape, and drop it between the Begin (green circle) and End (red octagon)

shapes.

3. From the toolbox, drag the Decide shape beneath the Receive shape.

4. From the toolbox, drag the Transform shape to the left branch of the Decide

shape. The Transform shape is nested inside the Construct Message shape.

5. From the toolbox, drag the Send shape beneath the Transform shape.

6. From the toolbox, drag the Send shape to the right branch of the Decide shape.

The orchestration looks like the following after you added the action shapes:

7. To define message variables & To configure the properties of the shapes go to:

http://msdn.microsoft.com/en-us/library/aa578186

Page 13: Pal gov.tutorial3.session10.lab4

Lesson 2: Steps 3 & 4

• Step 3: Add Ports to the Orchestration:

http://msdn.microsoft.com/en-us/library/aa559215

• Step4: To build the EAIOrchestration project:

– In Solution Explorer, right-click EAIOrchestration, and then click Build.

Page 14: Pal gov.tutorial3.session10.lab4

Lesson 3: Step 1&2: configure and deploy

the projects

• To configure and deploy the projects

1. In Solution Explorer, right-click the EAISchemas project, and then click

Properties.

2. Click the Signing tab, select Sign the assembly.

3. From the drop-down list in the Choose a strong name key file box, select

<Browse…>.

4. In the Select File dialog box, navigate to C:\BTStutorials, click

btsTutorials.snk, and then click Open.

5. Click the Deployment tab, in the box to the right of Application Name, type

EAISolution.

6. From the drop-down list in the box to the right of Redeploy, select True.

7. In Solution Explorer, right-click EAISchemas, and then click Deploy.

8. Repeat step 1 through 7 to deploy the EAIOrchestration project.

• Step2: Configure and Start the Application : http://msdn.microsoft.com/en-

us/library/dd334500

Page 15: Pal gov.tutorial3.session10.lab4

Lesson 3: test the EAI solution

• To test the EAI solution

1. Open Windows Explorer, and navigate to C:\BTSTutorials\WareHouse.

This folder is created by installing the tutorial files.

2. Copy RequestInstance.XML and paste it into

C:\BTSTutorials\WareHouse\Request.

3. When the file disappears, check C:\BTSTutorials\ERP\Request.

4. In Windows Explorer, navigate to C:\BTSTutorials\WareHouse.

5. Copy RequestInstance(Over Limit).XML and paste it into

C:\BTSTutorials\WareHouse\Request.

6. When the file disappears, check

C:\BTSTutorials\WareHouse\RequestDecline.

Page 16: Pal gov.tutorial3.session10.lab4

16PalGov © 2011

Practical Session (National Student Registry)

Description:

Based on practical sessions of other tutorials: “The central management of

students’ profiles by the ministry of education is becoming an urgent need in the last years.

Many students in Palestine move from one university to another, and they need to transfer

their academic records. Also, the ministry of higher education needs to certify the diplomas

and mark sheets of students. Moreover, there is a need to centrally manage/monitor students

financial aids. Therefore, the ministry of higher education has decided to build a national

student registry, such that, each semester every university has to send the academic record

of its students to the ministry of higher education. The ministry will then update and integrate

the academic records according to the data combined from all universities into the national

student registry.”

The ministry decided to implement several e-services on top of the national student

registry. Implement a web service to look up the accumulated average for a given

person, based on his IDCard number.

Page 17: Pal gov.tutorial3.session10.lab4

17PalGov © 2011

Practical Session (National Student Registry)

• Every two students can work togather.

• Students are expected to implement the web services using MS Visual Studio

• Create and build the project in the enterprise application integration (EAI)

solution.

• The project contains message schemas, and a map

• Create the business process that routes the messages and evaluates the

contents of the request message.

• Finally, Deploy the project, Configure and start the application and Test the

solution

Page 18: Pal gov.tutorial3.session10.lab4

18PalGov © 2011

Thank you!