session 2 evolution web service and primitive soa
TRANSCRIPT
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
1/25
SOA Concepts
605.702 Service Oriented ArchitectureJohns-Hopkins University
Montgomery County Center, Spring 2009Session 2: Lecture 2, February 4, 2009
Instructor: T. Pole
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
2/25
Session #2 Todays Agenda Required Reading (to be read before class)
Erl Chapter 4: The Evolution of SOA Erl Chapter 5: Web Services and Primitive SOA
Todays Presentation
Todays Lecture Review Chapters 1, 2 (and finish 3)
Introducing SOA (Ch 3)
Evolution of SOA (Ch 4)
Web Services and Primitive SOA (Ch 5) Content Management and the CMIS (additional material)
Setting up the environment Visual Studio 2008
Windows XP preferred (Vista also works. May need specific version, with configuration)
Client Implementation with SOAP and .Net Building the Client
Referencing the Server
Running the client
Assignments Exercise 1 (due 2/11/2009) Building a Web Service Client
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
3/25
Review Last Week
Not a lecture, but an opportunity for you to
ask questions
Chapter 1: About the Book
Chapter 2: About the Case Studies
General Discussion
What is a Service?
What is a Web Service?
What is Service Oriented Architecture?
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
4/25
Ch 3 Introducing SOA Section 3.1 Fundamental SOA
Services encapsulate logic within a distinct context
Context == business task or business entity or any logical
grouping
Varied scales == a process step, set of steps or the entire
process Services are related via relationships
Services communicate via messages which are
independent units of communication
Service design promotes: loose coupling, contract drivencomposability, autonomy, discoverable stateless reusable
components
To this point we have described primitive SOA
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
5/25
Section 3.2: Defining SOA
Section 3.2 Common Characteristics of
Contemporary SOA
See list of primary characteristics, page 40-41
3.2.20 Defining SOA page 54
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
6/25
Section 3.3 SOA Misperceptions
3.3.1 thru 3.3.3: Major Misperception #1: SOA is NOT reallysomething new NOT Some validity, but the combination of Old ideas, as well as
some new ideas synthesizes a new approach: th whole is greaterthen the sum of its parts.
3.3.4: SOA Simplifies: NOT The point is not to simplify the solution to the problem, but to
simplify performing individual steps in solving he problems, and inthe integration of those resultant steps into the complete solution.
3.3.5 thru 3.3.6: SOA is Web Services, or WS with someextensionsNOT
Those are just technologies used to implement SOA 3.3.7 SOA makes everything interoperable NOT
If you design and build an SOA system properly, its pieces areinteroperable with similar good SOA systems
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
7/25
Section 3.4 SOA Benefits and the start of
a Business Case for SOA
3.4.1 thru 3.4.3: Component Based Software
Engineering benefits:
Integration of components, reuse of components,
streamlined architecting of components into solutions.
Business Case is reduction of effort, solving multiple
problems with single work products.
3.4.4 Leveraging the Legacy Systems
Retaining and (optionally) controlling the evolutionary
replacement of legacy systems
Business Case is extending usable life of past investments
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
8/25
Section 3.5 Common Pitfalls in Adopting
SOA
Designing an SOA as though it were a traditional
distributed architecture
Question: What kinds of systems should not be designed
as SOA?
Not having an XML foundation
What problem is it that XML solves?
Not understanding SOA Performance and Security
What does SOA change in designing for Performancerequirements?
What does SOA change in designing for Security
requirements?
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
9/25
Chapter 4: The Evolution of SOA Section 4.1 An SOA Timeline
XML Initially a publishing tool
Then a data format tool
Now a service oriented version of a remote procedure callprotocol
Web Services Initially port 80 tunnelling
Initially Simple Object Access Protocol
Now (with WS-*) much more complex
Security
Dependable delivery Orchestration
SOA
Forced evolution of XML and Web Services
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
10/25
Section 4.2: Continuing Evolution of SOA
Standards, Specifications, and Extensions
Standards Organizations
Vendors
Distributed Tool and System Vendors
Forward Thinking, Imaginative Vendors
Not a good thing, notice the quotation marks above
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
11/25
Section 4.3: Roots of SOA
A distributed integration/communication
protocol
Can be synchronous or asynchronous
HTTP basis of most SOAP implementations
forces some call and response behavior
Can be used to wrap non Service Oriented
components, integrating their functionality into an SOA
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
12/25
Chapter 5Web Services and Primitive SOA
Section 5.1 Web Services Framework
Services exposed through a Web Server, usually
via SOAP (sometimes other protocols such as
REST) that may or may not be service oriented
Primitive SOA (simplistic definition) SOAP
WSDL
UDDI
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
13/25
Section 5.2 Service Descriptions: Roles
and Models
Business Service Model
Encapsulate operations related to this business
processes
Utility Service Model Encapsulates operations related to infrastructure,
basic system engineering functions
Controller Service Model Controls multiple services for a high level, more
complex, larger scope task
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
14/25
Section 5.3 Service Descriptions
WSDL
Describes a service
What operations does it publish
Programmatic interface specification level ofdescription
Supports export of common data types as well
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
15/25
Section 5.4 Messaging with SOAP
Types of Service Nodes Soap Sender
Initiates a communication between two nodes (services)
Initial Senderin a serial chain of SOAP message exchanges,
the first node in the change
Soap Receiver Received the SOAP envelope
Ultimate Receiverin a serial chain of SOAP message
exchanges, the node that only responds, it does not send another
message on to another node
SOAP Intermediary Receives a SOAP message and passes on a SOAP message
Active IntermediaryCan change the SOAP message before
passing it on
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
16/25
Implementing Web Services
We will have an in class tutorial tonight on developing
web services on XP Pro, IIS, and Visual Studio.
You can build and test Web Services without IIS. But
for other computers to reach those web services, aSOAP enabled Web Server, sometimes (erroneously)
called a SOAP Application Server, IIS must be used to
deploy them.
This will help you get started by getting, VS 2008 and
the .Net framework up and running and being able to
build a client for a basic Web Service using C#.
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
17/25
How to: Setup Visual Studio 2008 Pro Register with Microsoft DreamSpark
www.dreamspark.com https://www.dreamspark.com/FAQ/Students.aspx#universit
yStudentVerification
Download Visual Studio 2008 Download:https://www.dreamspark.com/Products/product.a
spx?productid=1 Get Key: at bottom of page
System_Requirements:http://www.microsoft.com/visualstudio/en-us/products/professional/default.mspx
Fairly simple installation procedure
Select max install you have disk space for Select .Net 3.5, install MSDN documentation
SQL Server and ther tools are optional
Any additional questions, email me.
http://www.dreamspark.com/https://www.dreamspark.com/FAQ/Students.aspxhttps://www.dreamspark.com/FAQ/Students.aspxhttps://www.dreamspark.com/Products/product.aspx?productid=1https://www.dreamspark.com/Products/product.aspx?productid=1http://www.microsoft.com/visualstudio/en-us/products/professional/default.mspxhttp://www.microsoft.com/visualstudio/en-us/products/professional/default.mspxhttp://www.microsoft.com/visualstudio/en-us/products/professional/default.mspxhttp://www.microsoft.com/visualstudio/en-us/products/professional/default.mspxhttp://www.microsoft.com/visualstudio/en-us/products/professional/default.mspxhttp://www.microsoft.com/visualstudio/en-us/products/professional/default.mspxhttps://www.dreamspark.com/Products/product.aspx?productid=1https://www.dreamspark.com/Products/product.aspx?productid=1https://www.dreamspark.com/FAQ/Students.aspxhttps://www.dreamspark.com/FAQ/Students.aspxhttp://www.dreamspark.com/ -
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
18/25
How to Build a Windows Console
Application 1 of 3
Start Visual Studio (VS 2008)
File -> New -> Project
Choose the Console Application template
Type in a path to where you will store the files forthis application
Be sure the Project Type tab is C#
Enter a name in the project Name textbox, and
optionally the same or different name in the SolutionName
Click OK
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
19/25
How to Build a Windows Console
Application 2 of 3
The Solution Explorer Window shows Files, settings, etc.
There is a file named Program.cs. Which is the
source file for this project Select with right mouse button in explorer
windows, left of screen add service reference
Click Advanced button At bottom of Service References Settings click
Add Web Reference
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
20/25
20
Build a Web Service Client 3 of 3
In URL enter http:areopagus-
soa.net/TP_Sample01_SimpleWebServer/Se
rvice.asmx
Enter meaningful name in Web Reference
Name textbox, e.g. SimpleWebService This is the namespace for the reference to the
web service
Click Add Reference button
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
21/25
Code Sample for Client
string FirstName, LastName;
Console.Out.WriteLine( "Enter first name:" );
FirstName = Console.In.ReadLine();
Console.Out.WriteLine( "Enter last name:" );
LastName = Console.In.ReadLine();
Console.Out.WriteLine("Creating proxy for web service.");
SimpleWebService.Service Server = newtestapp_020209.SimpleWebServer.Service();
Console.Out.WriteLine("Invoking opertion");
string Result = Server.SaveMyName(FirstName, LastName);
Console.Out.WriteLine("Result is " + Result);Console.Out.WriteLine("Enter to exit");
Console.In.ReadLine();
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
22/25
Build and Debug/Run the Client
Menu: Build -> Rebuild Solution
Menu: Debug -> Start Debugging
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
23/25
How To: Setting Up Windows XP IIS
Server
IIS is an optional install on Windows XP Pro
Control Panel->Add/Remove programs
->Add/Remove Windows Components->
Select Internet Information Services (IIS)->Next, Finish
Select the Front Page 2000 Extensions option
http://localhost
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
24/25
FAQ (.Net Web Service Development)
I've installed the .NET Framework, but ASP.NETdoesn't seem to work. What can I do to fix it? You must have IIS (Internet Information Services) installed
before you install the .NET Framework.
If you install IIS after you install the .NET Framework, you
must also register the ASP.NET extensions with IIS. You can do this by running the aspnet_regiis executable from:
%windows root directory%\Microsoft.NET\Framework\%versionof the .NET Framework%\aspnet_regiis -r
where %windows root directory% is the directory Windows isinstalled to (typically c:\windows or c:\winnt)
and %version of the .NET Framework% is the version of the.NET Framework you have installed.
The directory for .NET 1.0 is v1.0.3705, for 1.1 is v1.1.4322, andfor 2.0 is v2.0.50727
-
7/27/2019 Session 2 Evolution Web Service and Primitive SOA
25/25
Exercise 1: Build a Client for the Simple
Web Service
The Web Service is at:Areopagus-soa.net/TP_Sample01_SImpleWebServer/Service.asmx
Build a simple client that can invoke the operation:
SaveMyName
Use the WSDL to read the interfaceAreopagus-soa.net/TP_Sample01_SImpleWebServer/Service.asmx?wsdl
Also available from the generated C# code after you add a
reference to the Web Service
Due next week
Email me the executable and the source file Program.cs
In the bin/debug folder