‫أكاديمية الحكومة اإللكترونية الفلسطينية‬
         The Palestinian eGovernment Academy
              www.egovacademy.ps

                       Tutorial III:
Process Integration and Service Oriented Architectures



              Practical Session
                (National Student Registry)




                         PalGov © 2011                   1
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
Project Consortium:
             Birzeit University, Palestine
                                                           University of Trento, Italy
             (Coordinator )


             Palestine Polytechnic University, Palestine   Vrije Universiteit Brussel, Belgium


             Palestine Technical University, Palestine
                                                           Université de Savoie, France

             Ministry of Telecom and IT, Palestine
                                                           University of Namur, Belgium
             Ministry of Interior, Palestine
                                                           TrueTrust, UK
             Ministry of Local Government, Palestine


Coordinator:
Dr. Mustafa Jarrar
Birzeit University, P.O.Box 14- Birzeit, Palestine
Telfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011
                                                                                                 2
© 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.

                                 PalGov © 2011                               3
Tutorial Map



           Intended Learning Objectives
A: Knowledge and Understanding
                                                                                    Title                    T    Name
 3a1: Demonstrate knowledge of the fundamentals of middleware.
 3a2: Describe the concept behind web service protocols.
                                                                     Session0: Syllabus and overview         0   Aldasht
 3a3: Explain the concept of service oriented architecture.          Sesson1: Introduction to SOA            2   Aldasht
 3a4: Explain the concept of enterprise service bus.                 Session2: XML namespaces & XML schema   2   Aldasht
 3a5: Understanding WSDL service interfaces in UDDI.                 Session 3: Xpath & Xquery               4   Romi
B: Intellectual Skills                                               Session4: REST web services             3   M. Melhem
 3b1: Design, develop, and deploy applications based on Service      Session5: Lab2: Practice on REST        3   M. Melhem
 Oriented Architecture (SOA).                                        Session 6: SOAP                         2   Aldasht
 3b2: use Business Process Execution Language (BPEL).                Session 7: WSDL                         3   Aldasht
 3b3: using WSDL to describe web services.
                                                                     Session8: Lab 3: WSDL practice          3   Aldasht
C: Professional and Practical Skills                                 Session9: ESB                           4   Aldasht
 3c1: setup, Invoke, and deploy web services using integrated
                                                                     Session10: Lab4: Practice on ESB        4   Aldasht
 development environment.
                                                                     Session11: integration patterns         4   M. Melhem
 3c2: construct and use REST and SOAP messages for web
 services communication.                                             Session12: Lab5: integration patterns   4   M. Melhem
D: General and Transferable Skills                                   Session13: BPEL                         3   Aldasht
 d1: Working with team.                                              Session14: Lab6: Practice on BPEL       3   Aldasht
 d2: Presenting and defending ideas.                                 Session15: UDDI                         2   Aldasht
 d3: Use of creativity and innovation in problem solving.
 d4: Develop communication skills and logical reasoning abilities.
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.
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
Lesson 1: Step1 & 2

• Step1: Create New Empty BizTalk Server Project.
   –   Name: EAISchemas.
   –   Location: C:tutorialLessons.
   –   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.
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.
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.
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.
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:BTSTutorialsEAISolution.
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.
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
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.
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
Lesson 3: test the EAI solution

•   To test the EAI solution
    1.   Open Windows Explorer, and navigate to C:BTSTutorialsWareHouse.
         This folder is created by installing the tutorial files.
    2.   Copy RequestInstance.XML and paste it into
         C:BTSTutorialsWareHouseRequest.
    3.   When the file disappears, check C:BTSTutorialsERPRequest.
    4.   In Windows Explorer, navigate to C:BTSTutorialsWareHouse.
    5.   Copy RequestInstance(Over Limit).XML and paste it into
         C:BTSTutorialsWareHouseRequest.
    6.   When the file disappears, check
         C:BTSTutorialsWareHouseRequestDecline.
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.




                                        PalGov © 2011                                       16
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




                                 PalGov © 2011                              17
Thank you!




   PalGov © 2011   18

Pal gov.tutorial3.session10.lab4

  • 1.
    ‫أكاديمية الحكومة اإللكترونيةالفلسطينية‬ The Palestinian eGovernment Academy www.egovacademy.ps Tutorial III: Process Integration and Service Oriented Architectures Practical Session (National Student Registry) PalGov © 2011 1
  • 2.
    About This tutorial ispart 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 Project Consortium: Birzeit University, Palestine University of Trento, Italy (Coordinator ) Palestine Polytechnic University, Palestine Vrije Universiteit Brussel, Belgium Palestine Technical University, Palestine Université de Savoie, France Ministry of Telecom and IT, Palestine University of Namur, Belgium Ministry of Interior, Palestine TrueTrust, UK Ministry of Local Government, Palestine Coordinator: Dr. Mustafa Jarrar Birzeit University, P.O.Box 14- Birzeit, Palestine Telfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011 2
  • 3.
    © Copyright Notes Everyoneis 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. PalGov © 2011 3
  • 4.
    Tutorial Map Intended Learning Objectives A: Knowledge and Understanding Title T Name 3a1: Demonstrate knowledge of the fundamentals of middleware. 3a2: Describe the concept behind web service protocols. Session0: Syllabus and overview 0 Aldasht 3a3: Explain the concept of service oriented architecture. Sesson1: Introduction to SOA 2 Aldasht 3a4: Explain the concept of enterprise service bus. Session2: XML namespaces & XML schema 2 Aldasht 3a5: Understanding WSDL service interfaces in UDDI. Session 3: Xpath & Xquery 4 Romi B: Intellectual Skills Session4: REST web services 3 M. Melhem 3b1: Design, develop, and deploy applications based on Service Session5: Lab2: Practice on REST 3 M. Melhem Oriented Architecture (SOA). Session 6: SOAP 2 Aldasht 3b2: use Business Process Execution Language (BPEL). Session 7: WSDL 3 Aldasht 3b3: using WSDL to describe web services. Session8: Lab 3: WSDL practice 3 Aldasht C: Professional and Practical Skills Session9: ESB 4 Aldasht 3c1: setup, Invoke, and deploy web services using integrated Session10: Lab4: Practice on ESB 4 Aldasht development environment. Session11: integration patterns 4 M. Melhem 3c2: construct and use REST and SOAP messages for web services communication. Session12: Lab5: integration patterns 4 M. Melhem D: General and Transferable Skills Session13: BPEL 3 Aldasht d1: Working with team. Session14: Lab6: Practice on BPEL 3 Aldasht d2: Presenting and defending ideas. Session15: UDDI 2 Aldasht d3: Use of creativity and innovation in problem solving. d4: Develop communication skills and logical reasoning abilities.
  • 5.
    BizTalk Server 2010Basic 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.
  • 6.
    Tutorial 1: EnterpriseApplication 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
  • 7.
    Lesson 1: Step1& 2 • Step1: Create New Empty BizTalk Server Project. – Name: EAISchemas. – Location: C:tutorialLessons. – 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.
  • 8.
    Add elements tothe 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.
  • 9.
    Lesson 1: Step3: 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.
  • 10.
    Lesson 1: Steps4&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.
  • 11.
    Lesson 2: Step1: 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:BTSTutorialsEAISolution. 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.
  • 12.
    Lesson 2: Step2: 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
  • 13.
    Lesson 2: Steps3 & 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.
  • 14.
    Lesson 3: Step1&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
  • 15.
    Lesson 3: testthe EAI solution • To test the EAI solution 1. Open Windows Explorer, and navigate to C:BTSTutorialsWareHouse. This folder is created by installing the tutorial files. 2. Copy RequestInstance.XML and paste it into C:BTSTutorialsWareHouseRequest. 3. When the file disappears, check C:BTSTutorialsERPRequest. 4. In Windows Explorer, navigate to C:BTSTutorialsWareHouse. 5. Copy RequestInstance(Over Limit).XML and paste it into C:BTSTutorialsWareHouseRequest. 6. When the file disappears, check C:BTSTutorialsWareHouseRequestDecline.
  • 16.
    Practical Session (NationalStudent 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. PalGov © 2011 16
  • 17.
    Practical Session (NationalStudent 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 PalGov © 2011 17
  • 18.
    Thank you! PalGov © 2011 18