Professional Documents
Culture Documents
Chris Armstrong
ATC Enterprises, Inc.
1751 West County Road B, Suite 310
Roseville, MN 55113
651.633.1818
www.atcenterprises.com
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
What is a Web Service?
.What
. . . . . . is
. . .a. .Web
. . . . . .Service?
........................................
• Represents a specific business function
• Exposed by a company
• Usually through an Internet connection
• Provided to another company or software application to
consume
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
What are Web Service Applications?
.What
. . . . . . are
. . . . Web
. . . . . . Service
. . . . . . . . . Applications?
................................
• Hyper-applications that are
• Designed
• Assembled
• Executed
dynamically at run-time using web services
• Especially in a B2B environment
• Use emerging industry standards
• Extensible Markup Language (XML)
• Simple Object Access Protocol (SOAP)
• Web Services Description Language (WSDL)
• Universal Description, Discovery, and Integration (UDDI)
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Web Services Business Model
.Web
. . . . . .Services
. . . . . . . . . .Business
. . . . . . . . . . Model
...............................
Service
Provider
Register Web Service
Service
Broker
Find Web Service
Service
Requester
Cons ume Web Service
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Fundamental Web Service Concepts
.Fundamental
. . . . . . . . . . . . . . .Web
. . . . . .Service
. . . . . . . . Concepts
............................
Service Standard
Publish UDDI
Find UDDI, WSDL,
DISCO
Bind WSDL, SOAP
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Realization of Web Services Business Model
.Realization
. . . . . . . . . . . . .of
. . Web
. . . . . . Services
. . . . . . . . . . Business
. . . . . . . . . . .Model
...............
Publish Web Service Register Web Service Find Web Service Consume Web Service
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Web Services Architectural Mechanisms
.Web
. . . . . .Services
. . . . . . . . . .Architectural
. . . . . . . . . . . . . .Mechanisms
...........................
Web Discovery
Services
Web Description
Services
Web Wire
Services
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Web Wire Services
.Web
. . . . . .Wire
. . . . . Services
..............................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
IPC Wire Services
.IPC
. . . . .Wire
. . . . . Services
...............................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Wire Services
.SOAP
. . . . . . . Wire
. . . . . . Services
............................................
SOAP
HTTP XML
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Web Description Services
.Web
. . . . . .Description
. . . . . . . . . . . . .Services
......................................
<<design mechanism>> <<implementation mechanism>>
Business Process Orchestration BizTalk
<<design mechanism>>
Message Sequencing <<implementation mechanism>>
<<analysis mechanism>> WSFL
Workflow Automation
<<design mechanism>>
Service Capability Configuration <<implementation mechansim>>
UDDI
<<analysis mechanism>>
Applicat ion Integration
<<design mechanism>>
Service Descript ion <<implementation mechanism>>
WSDL
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Web Discovery Services
.Web
. . . . . .Discovery
. . . . . . . . . . .Services
........................................
<<design mechanism>>
Directory Service
<<implementation mechansim>>
<<analy sis mechanism>> UDDI
Disc overy Services
<<design mechanism>>
Inspection Service
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
What is SOAP?
.What
. . . . . . is
. . .SOAP?
................................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Benefits of SOAP
.Benefits
. . . . . . . . . of
. . . SOAP
.............................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Benefits of SOAP
.Benefits
. . . . . . . . . of
. . . SOAP
.............................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Web Application Extensions (WAE) for UML
.Web
. . . . . .Application
. . . . . . . . . . . . Extensions
. . . . . . . . . . . . .(WAE)
. . . . . . . .for
. . . UML
...............
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Standard HTTP Form POST
.Standard
. . . . . . . . . . HTTP
. . . . . . . .Form
. . . . . .POST
.................................
Client P age
Re nderer
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Request from Browser - Structure
.SOAP
. . . . . . . Request
. . . . . . . . . . from
. . . . . .Browser
. . . . . . . . . .- .Structure
.......................
< < interfac e>>
IS OA P P ro xy
Form Client P age
XM L P ars er
Cl ient P age
Renderer
S OA P Reques t
S OA P Response (from S OA P )
(from S OA P )
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Request from Browser - Behavior
.SOAP
. . . . . . . Request
. . . . . . . . . . from
. . . . . .Browser
. . . . . . . . . .- .Behavior
.......................
2: newRequest( )
3: new
4: encode
5: postRequest(S OA P Request)
6: re c eive(S O A P R eque s t)
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Request on Server - Structure
.SOAP
. . . . . . . Request
. . . . . . . . . . on
. . . .Server
. . . . . . . .- . Structure
...........................
< < interfac e> >
IS OA P Trans lator
S OA P Res pons e
(from S OAP ) + rec eiveReques t(S OA P Reques t)
- s endRes pons e() : S OA P Res po...
- loc ateCom ponent()
- buildRes pons e()
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Request on Server - Behavior
.SOAP
. . . . . . . Request
. . . . . . . . . . on
. . . .Server
. . . . . . . .- . Behavior
...........................
: XM L P ars er
: : :
IS OA P P roxy IS OA P Trans lator ICom ponentInterfac e
1: rec eiveRequest(S OA P Request)
2: dec ode( )
4: m ethod( )
5: bu ildRes ponse( )
6: sendRes ponse( )
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Process View
.SOAP
. . . . . . . Process
. . . . . . . . . .View
........................................
< < proc es s > >
Cli ent P ro cess
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Deployment View
.SOAP
. . . . . . . Deployment
. . . . . . . . . . . . . . View
....................................
B ro wse r P ro ce ss
We b S e rve r P ro ce ss Co m p o n e n t P ro ce ss
T ra n sl a to r P ro ce ss
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
What is WSDL?
.What
. . . . . . is
. . .WSDL?
................................................
• Web Services Description Language (WSDL)
• Way to describe web services
• Where do they reside locally
• What are they called
• How are external operations bound to internal operations
• How data is encoded
• How operation is invoked
• WSDL is similar to an interface in a component architecture, but
also includes information on
• Protocol bindings
• Deployment
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
What is WSDL?
.What
. . . . . . is
. . .WSDL?
................................................
• History
• Started as Service Description Language (SDL)
• Part of early SOAP efforts
• Turned into Service Contract Language (SCL)
• Currently called Web Services Description Language (WSDL)
• In Apache SOAP, use XML Deployment Descriptors
• Register with ServiceManagerClient in org.apache.soap.server
package
• WSDL extensions defined
• HTTP GET
• HTTP POST
• SOAP
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
WSDL Generation
.WSDL
. . . . . . . .Generation
.................................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
WSDL Schema – High-Level
.WSDL
. . . . . . . .Schema
. . . . . . . . .–
. . High
. . . . . -. Level
................................
WSDL schema
documentation
0..1 0..n
0..n
definitions message binding
targetNamespace name name
documentation
0..1
0..n
types portType
documentat ion name
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
WSDL Schema – Types
.WSDL
. . . . . . . .Schema
. . . . . . . . .–
. . Types
......................................
schema
types att ributeFormDefault element
documentation element FormDefault
0..n name
targetNamespace
minOc curs
0.. n maxOccurs
nillable
sequence
+type
0..1 0..1 0..n
complexType
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
WSDL Schema – Messages
.WSDL
. . . . . . . .Schema
. . . . . . . . .–
. . Messages
......................................
element
name 0..1 +type
minOccurs 0..1
maxOccurs
complexType
nillable
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
WSDL Schema – Port Types and Bindings
.WSDL
. . . . . . . .Schema
. . . . . . . . .–
. . Port
. . . . . .Types
. . . . . . .and
. . . . .Bindings
....................
portType binding
name name
1.. n
operation
name 1
documentation
+t ype 0..1
+output complexType
+fault
0..1 0.. 1 0..1
+input
message
name
documentation
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
UML for WSDL
.UML
. . . . . .for
. . . WSDL
................................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
UML for WSDL
.UML
. . . . . .for
. . . WSDL
................................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Sample UML for WSDL – High-Level
.Sample
. . . . . . . . .UML
. . . . . .for
. . . WSDL
. . . . . . . . –. . High
. . . . . -.Level
.......................
<<wsdl service>>
ZIPCodeResolver
<<port>>
<<port>>
<<wsdl port Type>> <<wsdl binding>>
ZIPCodeResolverHTTPPost ZIPCodeResolverHTTPPost
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Sample UML for WSDL – Detailed
.Sample
. . . . . . . . .UML
. . . . . .for
. . . WSDL
. . . . . . . . –. . Detailed
.............................
<<wsdl service>>
ZIPCodeRes olver
<<element>> FullZipCode
<<element>>
<<element>> FullZipCodeResponse
USPSAddress
<<element>> CorrectedAddressHTML
<<element>> CorrectedAddressHTMLResponse <<element>> Street
<<element>> City
<<message>> FullZipCodeHt tpGetIn() <<element>> State
<<message>> FullZipCodeHt tpGetOut () <<element>> ShortZIP
<<message>> FullZipCodeHt tpPost In() <<element>> FullZIP
<<message>> FullZipCodeHt tpPost Out ()
<<message>> FullZipCodeSoapIn()
<<message>> FullZipCodeSoapOut ()
<<port>>
FullZipCode() FullZipCode()
ShortZipCode() ShortZipCode()
CorrectedAddressHTML() CorrectedAddressHTML()
CorrectedAddressXML() CorrectedAddressXML()
VersionInfo() VersionInfo()
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Sample UML for WSDL – Context
.Sample
. . . . . . . . .UML
. . . . . .for
. . . WSDL
. . . . . . . . –. . Context
.............................
<<wsdl service>>
ZIPCodeResolver
FullZipCode()
ShortZipCode()
CorrectedAddress()
CorrectedAddress() ZIPCodeResolver
VersionInfo()
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
What is UDDI?
.What
. . . . . . is
. . .UDDI?
................................................
• Universal Description, Discovery and Integration (UDDI)
• A specification for distributed Web-based information registries
of Web services
• Collaborative initiative
• IBM
• Microsoft
• Ariba
• Create a global, platform-independent, open framework to
rapidly accelerate the global adoption of B2B e-commerce
• Enable businesses to discover each other
• Define how they interact over the Internet
• Share information in a global registry
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
What is UDDI?
.What
. . . . . . is
. . .UDDI?
................................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
UDDI Logical Architecture
.UDDI
. . . . . . .Logical
. . . . . . . .Architecture
..........................................
businessEntity
businessService
bindingTemplate
t Model
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
UDDI Leaders
.UDDI
. . . . . . .Leaders
..................................................
• IBM
• UDDI4J
• Microsoft
• UDDI for .NET
• SDK for Visual Studio 6.0
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
UDDI4J Overview
.UDDI4J
. . . . . . . . . Overview
................................................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
UDDI4J Key Components
.UDDI4J
. . . . . . . . . Key
. . . . .Components
...........................................
UDDIException
datatype response
UDDIElement
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
UDDI4J Key Components
.UDDI4J
. . . . . . . . . Key
. . . . .Components
...........................................
• uddi.client package
• Especially UDDIProxy class
• Methods map to the UDDI Programmer’s API Specification
• uddi.datatype package
• Contains core UDDI datatypes to send and receive data from a UDDI
server
• uddi.request package
• Used internally by UDDIProxy for sending messages to a UDDI server
• uddi.response package
• Used internally by UDDIProxy for receiving messages from a UDDI
server
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Sample UDDI Usage – Inquire – Behavior
.Sample
. . . . . . . . .UDDI
. . . . . . .Usage
. . . . . . .–
. . Inquire
. . . . . . . . .–. .Behavior
.....................
: Get Business Name : UDDIProxy : BusinessList : BusinessInfo : : BusinessInfo
BusinessInfos Vector
1: UDDIProxy( )
2: setInquiryURL(url : String)
4: getBusinessInfos( )
5: getBusinessInfoVector( )
6: elementAt(arg0 : int)
7: getNameString( )
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Sample UDDI Usage – Inquire – Structure
.Sample
. . . . . . . . .UDDI
. . . . . . .Usage
. . . . . . .–
. . Inquire
. . . . . . . . .–. .Structure
.....................
Get Business
Name
UDDIProxy
inquiryURL URL
UDDIProxy()
find_business ()
setInquiryURL() BusinessList Business Infos
businessInfos
getBusinessInfos() getBusinessInfoVector()
businessInfo
Vector BusinessInfo
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Apache SOAP Overview – Main Packages
.Apache
. . . . . . . . .SOAP
. . . . . . . Overview
. . . . . . . . . . .–
. . Main
. . . . . . Packages
......................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Apache SOAP Overview – Main Classes
.Apache
. . . . . . . . .SOAP
. . . . . . . Overview
. . . . . . . . . . .–
. . Main
. . . . . . Classes
......................
Envelope
Constants
-header
Header -body
Utils
-at trHandler Body
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Usage by UDDI – Part 1
.SOAP
. . . . . . . Usage
. . . . . . . . by
. . . UDDI
. . . . . . . –. . Part
. . . . .1
.........................
3: setName(s : String)
4: setFindQualifiers(s : FindQualifiers)
5: setMaxRows(s : int)
6: send(el : UDDIElement, inquiry : boolean)
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Usage by UDDI – Part 2
.SOAP
. . . . . . . Usage
. . . . . . . . by
. . . UDDI
. . . . . . . –. . Part
. . . . .2
.........................
2: Envelope( )
3: Body ()
4: Vector( )
Add passed
5: add(arg0 : Object) Element
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Usage by UDDI – Part 3
.SOAP
. . . . . . . Usage
. . . . . . . . by
. . . UDDI
. . . . . . . –. . Part
. . . . .3
.........................
2: Message( )
3: get transport
4: setSOAPTransport(st : SOAPTransport)
5: Element()
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Usage by UDDI – Part 4
.SOAP
. . . . . . . Usage
. . . . . . . . by
. . . UDDI
. . . . . . . –. . Part
. . . . .4
.........................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Usage by UDDI – Structure
.SOAP
. . . . . . . Usage
. . . . . . . . by
. . . UDDI
. . . . . . . –. . Structure
..............................
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Message Sending – Part 1
.SOAP
. . . . . . . Message
. . . . . . . . . . .Sending
. . . . . . . . . .–. .Part
. . . . .1. . . . . . . . . . . . . . . . . . . . . .
SOAP Client : Message st :
SOAPHTTPConnection
2: SOAPHTTPConnection()
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Message Sending – Part 2
.SOAP
. . . . . . . Message
. . . . . . . . . . .Sending
. . . . . . . . . .–. .Part
. . . . .2. . . . . . . . . . . . . . . . . . . . . .
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Message Sending – Part 3
.SOAP
. . . . . . . Message
. . . . . . . . . . .Sending
. . . . . . . . . .–. .Part
. . . . .3. . . . . . . . . . . . . . . . . . . . . .
st : headers :
SOAPHTTPConnection Hashtable
Constants.HEADER
1: Hashtable( ) _SOAP_ACTION
3: get userName
Constants.HEADER
4: get password _AUTHORIZATION
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Message Sending – Part 4
.SOAP
. . . . . . . Message
. . . . . . . . . . .Sending
. . . . . . . . . .–. .Part
. . . . .4. . . . . . . . . . . . . . . . . . . . . .
st : msg : : HTTPUtils
SOA PHTTPConnect ion TransportMessage
3: post(url : URL, request : Transport Message, timeout : int, httpProxyHost : S tring, httpProxyPort : int)
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
SOAP Message Sending - Structure
.SOAP
. . . . . . . Message
. . . . . . . . . . .Sending
. . . . . . . . . .-. Structure
............................
SOAP Client
StringWriter
StringWriter()
Message
<<Interface>>
send() SOA PContext
SOAPTransport
st
send()
SOAPHTTPConnection
password : String URL
userName : String
TransportMessage
SOAPHTTPConnection()
TransportMessage() send()
SOA PMappingRegistry
save()
Envelope
Hashtable
HTTPUtils
marshall()
Hashtable()
put() post()
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies
Web Resources
.Web
. . . . . .Resources
...................................................
• UDDI
• www.uddi.org
• uddi.microsoft.com
• www.ibm.com/services/uddi
• SOAP
• www.soap.org
• www.soaprpc.com
• www.soapware.org
• www.soapclient.com
• www.soap-wrc.com
• Web Services
• www.webservices.org
• www-106.ibm.com/developerworks/webservices
• www.xmlmodeling.com
....................................................
Modeling Web Services with UML
Copyright 2002 ATC Enterprises, Inc., All rights reserved smart process strategies