web services development environment
DESCRIPTION
Web Services Development Environment. CNT5715 Fall 2010 Computer Network Programming S. Mansfield. Agenda. Application of Web Services Web Services Application Example The OSI Model and Web Services Web Services Development Flow Web Services Tool Chain WSDL Example Web Service Example - PowerPoint PPT PresentationTRANSCRIPT
Web ServicesDevelopment Environment
CNT5715 Fall 2010Computer Network Programming
S. Mansfield
09/09/2010 Web Services Development Environment 2
Agenda
Application of Web Services
Web Services Application Example
The OSI Model and Web Services
Web Services Development Flow
Web Services Tool Chain
WSDL Example
Web Service Example
Advanced Topic: Mobile Web Services
09/09/2010 Web Services Development Environment 3
Application of Web Services
Development of started around 1999
Focus was web centric services and applications
Far Reaching – Any Operating System, Any Language, Any HardwareIts really a communications architectureSimple application programming centric – Looks like classesLeverages TCP/IP infrastructure
Initially Over Hyped – Complex, many standards, technology hurdles
Key Standards Settled 2005
1st Decade Mergers and Acquisitions Drove Initial AdoptionMany disperse companies – All different IT SolutionsIntegrated many systems into one
Legacy Application MigrationFederal Government – Social SecurityDepartment of Defense – Procurement
Many Emerging Web Services Applications
Expanding into New Areas – Cloud Computing
09/09/2010 Web Services Development Environment 4
The OSI Model & Web Services
Application
Presentation
Session
Transport
Datalink
Network
Physical
OSI Model
Device Driver&
Hardware
Ipv4, IPv6
OthersTCP UDP
Application
Internet ProtocolSuite
Device Driver&
Hardware
Ipv4, IPv6
TCP
Web Services
Application
Web ServicesModel
Who Is Using Web Services?
SOA/WS Markets & Solutions(Forrester)
Wide Adoption Across Public, Education & Private SectorsExcellent Vendor Development & Tool SupportSupports New & Legacy EnvironmentsExcellent Architecture for Mobile Data Delivery
Public & Private Sector Growth(Gartner)
Universal in Europe, Rapidly Growing in the USA2007 – 50%> All New Large System Deployments Used SOA2010 – 80%> All New Large System Deployments Will Use SOA
Industry Examples(CIO)
Synovus – Commercial/Retail/ Investment BankingT-Mobile – Re-engineered IT Solutions using SOA Dell – Integrated WW Mfg & Delivery System with 3rd PartiesTwitter – Fully integrated SOA Service Delivery ModelLinkedin – Integrated Internal Amazon – Integrated SOA Business ModeleBay – Integrated SOA Business ModelFedEx – Integrated SOA Business ModelFord Motor Company – Integrated WW Supplier SOA NetworkStarwood Hotels – Replace Multiple Legacy Systems with One SOA SystemVerizon- Merged Multiple Legacy Acquisition CompaniesCitGroup – Integrated SOA Top/Down Throughout BusinessMotorola – Integrated 180 Separate Business GroupsFederal Government – Published Comprehensive SOA RoadmapUS Army – Replacing All Legacy Systems with SOADoD – Created Target SOA Architecture, Successfully Deploy Pilot ProgramsVeterans Administration – Plans to Migrate All Systems to SOASeveral States Migrating to SOA – AZ, IA, MA, UT, TX, WA
Web ServicesClient
Application
09/09/2010 Web Services Development Environment 6
Web Service Application
Web Services Based Travel Web Site
Airlines -- Delta
Hotels -- Marriot
Automobiles -- Hertz
Travel Services -- Sabre
RDMS
TravelCustomers
Before WS – Many 100’s Klocs With WS – Few 10’s Klocs Much Faster Development Much Less Cost Much Less Testing World Wide 24/7 Access
Web Browser
Web Browser
Web Browser
09/09/2010 Web Services Development Environment 7
UDDI
WSClient
WSServer
WSServer
WSServer
WSDL
WSDL
WSDL
The SOA Composite Map
BPEL
WSCI
UDDI – Universal Description, Discovery, and Integration
Universal phone book for Web Services White Pages: Direct contact information Yellow Pages: Business Description Green Pages: Technical Information
WSDL – Web Service Description Language
Describes the complete server operation,interface, protocols, and web ports.
BEPL – Business Execution Process Language
BPEL is the industry standard for business processorchestration. It is an XML-based language usedfor the definition and execution of businessprocesses as well as scientific workflowsusing Web services.
WSCI – Web Services Choreography Interface
A form of service composition in which theinteraction protocol between several partnerservices is defined from a global perspective
09/09/2010 Web Services Development Environment 8
Web Services Development Environment
Web Service Server
RDBSFramework•Java•.Net
JavaRDBMS
Application
WS EndpointInterface
WS EndpointPublisher
WSDL wsimport
Web ServiceClient
Application
JSE 6 .jarjavax.jwsjavax.xml.wsjavax.xml.rpcjavax.xml.soapjavax.xml.bind
WS AttributeClasses
Java EnterpriseEnvironment
InternetJava Client
Environment
• Java Web Services Development Environment• Fully Integrated Framework and Utilities• End to End Enterprise/Client Communications
09/09/2010 Web Services Development Environment 9
The WSDL
Port
Service
Binding
Input
OutputOperation
PortType
Message
Types
Ab
str
ac
t S
ec
tio
nC
on
cre
te S
ec
tio
n
WSDL 1.1WSDL the most important component of Web Services
Describes what the Web Services does and howFunctionsData typesProtocolsWhere to find service
The WSDL actually describes server classesClass nameClass methodsClass properties
The server has real objects and the client creates abstract interfaces
When either class is invoked the underlying SOAP response/requestcreates method calls and updates (synchronizes) the class properties
Extremely powerful seem-less communications architecture
Maximum flexibility with no exposure to underlying communications methods
End-to-End Type Safe
Underlying programming model is all Sockets TCP/IP bases
Very strong tool support -- automatic client abstract interface class generation (wsimport)
09/09/2010 Web Services Development Environment 10
PortType Class { }
Operation Method()
Message Property Type
Msg Name Property Name
Types Property Attributes
Binding Message Protocol
Service Server Location
Definitions
Target NamespaceWSDL XML Schema
WSDL Structure
09/09/2010 Web Services Development Environment 11
Web Services Platform Architecture
RequestSOAP
ResponseSOAP
Serv
ice
Endp
oint
In
terf
ace
Prox
y
Parameter
class {}
method()
Parameter
return
method()
Parameter
return
Invocation Subsystem(Client Side)
RequestSOAP
ResponseSOAP
Parameter
Parameter
return
Parameter
return
Invocation Subsystem(Server Side)
Parameter
class {}
method()
Parameter
return
method()
Parameter
return
ClientAbstractInterface
ServerTargetObject
Synchronization – Serialization -- Transmission Transmission – Serialization -- Synchronization
SOAP MessageExchange
(Specified by WSDL
MethodInvocation
MethodInvocation
Annotate & Publish ObjectsCreate Abstract Classes with wsimport
09/09/2010 Web Services Development Environment 12
wsimport/wsexport
WSDL wsimportfclass1 { method1() prop1 method2() prop2}
fclass1 { method1() prop1 method2() prop2}
object factory
service{ }
getClass1 { getprop1() getprop2()}
setClass1 { setprop1() setprop2()}
• Extracts WSDL
• Creates XML Schemas
• Compiles Attribute Classes
objectfactory class { }fmethods()getprop()setprop()
• Error Handling
• Multi-Threaded
Server Client
09/09/2010 Web Services Development Environment 13
WSDL wsimportwsexport
WSDL First Code First
(Server) (Client)
attributeclasses { }
end Implementation
Interfaces { }
Three Design Models• Code First• WSDL First• Code-WSDL First
Code Server Side Business ImplCreate Server Side EIC’s
Publish WSDLCompile WSDL Client Attribute Classes
Write WSDLCompile Server Side EIC’s
Code Server Side Business ImplCompile WSDL Client Attribute Classes
Who’s First Debate
+ Stable Server Side Code- Less Stable Client Code- Difficult to Read WSDL- Cross Platform Compatibility
+ Very Stable Clients+ Easy to Read WSDL- WSDL Syntax Interoperability- Less Stable Server Side Code
09/09/2010 Web Services Development Environment 14
Web Services Tool Chain
Web Service Server
RDBSFramework•Java•.Net
JavaRDBMS
Application
WS EndpointInterface
WS EndpointPublisher
WSDL wsimport
Web ServiceClient
Application
JSE 6 .jarjavax.jwsjavax.xml.wsjavax.xml.rpcjavax.xml.soapjavax.xml.bind
WS AttributeClasses
09/09/2010 Web Services Development Environment 15
A WSDL Example: .NET TimeServer
Display WSDL on Internet Browser
Examine Structure of WSDL
Extract WSDL and Create Client Attribute Classes
09/09/2010 Web Services Development Environment 16
A Simple Web Services Example: TimeServer Execution in Java
Compile TimeServer Server
Create Server Proxy on Local Host
Compile TimeServer Client
Exchange Data between Client and Local Host Server
09/09/2010 Web Services Development Environment 17
Advanced Web Service Example: Amazon Web Service Client
Extract WSDL and Create Attribute Classes
Compile and Link Client Program with Attribute Classes
Execute Amazon Web Service – Book Search
09/09/2010 Web Services Development Environment 18
Advanced Web Services Topic: Mobile Web Services
Web Service
RDBSFramework•Java•.Net
JavaRDBMS
Application
WS EndpointInterface
WS EndpointPublisher
WSDL wsimport Proc beansxml Abst
Java .jarsjavax.jwsjavax.xmlothes...
AndroidJava WS
Client
kSOAP2
Missing ToolComponents
Android Web Services Development Environment
Figure 1
Missing LibraryComponents
04/21/23 COT6905 Directed Independent Study 19
awsimportWSDL Android WSAttribute Classes
AndroidClient
Application
AndroidPlatform
Android WSLibrary
kSOAP2Library
Initial Android SOA Development Environment
Proposed WS Environment• Quick demonstration platform• Android specific environment• New wsimport awsimport• Creates Android attribute classes• New Android WS Library• Utilizes kSOAP2 Libraries
04/21/23 COT6905 Directed Independent Study 20
Mobile OSPlatforms
Android
Apple iOS
Blackberry OS
BREW/REX
Palm OS
Symbian
Windows Mobile
ProgrammingLanguages
Java
Objective C/C++
Java
C/C++, Java
C/C++, Java
C/C++, Java
C++, C#, VB
04/21/23 COT6905 Directed Independent Study 21
Embedded OSPlatforms
VXWorks
Win Embedded
Red Hat Linux
DSP/BIOS
QNX
pSOS
eCOS
ProgrammingLanguages
Asm, C
Asm,C, C#, VB
Asm, C, C++
Asm, C
Asm, C
Asm, C
Asm, C
04/21/23 COT6905 Directed Independent Study 22
WSDL mwsimport Libraries
Android
Symbian
Blackberry OS
iOSIDE Plug In’s
Android
Symbian
Blackberry OS
iOS
Mobile WSAttribute Classes
MobileClient
Application
MobilePlatform
Mobile SOA DevelopmentEnvironment
Mobile SOA Environment• Fully W3C Compliant• WSDL-to-Code Environment• Multiple Platform Support• mwsimport virtual compiler• Platform Specific IDE Plug-In’s• Platform Specific Libraries
Emerging Android WS Architecture
ExtractedWSDL
ExtractedWSDL
PseudoClass
Builder
PlatformClass
Compiler
WSDLObjectFactory
PlatformLibrary
PlatformWeb Service
Client
PlatformSupport
Environment
WSDL
Common Code Modules
Code Re-Use Modules
Platform Specific Client
Limited Resource Client Web ServiceDevelopment platform
04/21/23 COT6905 Directed Independent Study 24
Pseudo Class Builder
WSDL ParseportType
Class1
Class2
Classm
Parse Operation
Method11()
Method12()
Method1n()
ParseMessage
Element11
ParseElement
Type
Bind I/O & Protocols
Method11()
Method12()
Method1n()
Define service Ports
Method11()
Method12()
Method1n()
PseudoClass
ArrayList
Class1
Class2
Classm
Abstract Classes
Concrete Classes
ParseElement
Type
ParseElement
Type
Element12
Element1o
Pseudo Class Builder (WSDL 1.1/1.2) Decomposes WSDL Creates & Defines Classes & Methods Defines Elements & Types Builds Pseudo Classes
Figure 12.
04/21/23 COT6905 Directed Independent Study 25
Platform Class Factory
PseudoClass
NewclassName
Constructor { Build class }
Method1()MarshalSOAPObject
IssueSOAPRPC
Set(element) Element
MessageOK
MessageError
PostError
Return
PseudoClass
NewclassName
Constructor { Build class }
Method1()MarshalSOAPObject
IssueSOAPRPC
Get(element) element
MessageOK
MessageError
PostError
DeserializeSOAPObject
WS Input(Output from WS Client)
WS Output(Input from WS Client)
UpdateElements
Return
Object Factory
Class1{}Class2{}Class3{}...
Service.language.source
Platform Class Factory
Figure 13.
04/21/23 COT6905 Directed Independent Study 26
HttpTransportHttpTransportBasicAuth
HttpTransportSE
MarshalBase64MarshalDateMarshalFloat
MarshalHashtable
ServiceConnectionServiceConnectionMidpServiceConnectionSE
SoapEnvelopeSoapFault
SoapObjectSoapPrimative
KvmSerializableSoapSerialization
SoapServlet
Transport
Platform Library
Interface for custom Serialization/Deserialization
Basic classes required for handling SOAPEnvelopes and literal XML content.
Methods to facilitate SOAP calls over HTTP using the J2ME generic connection framework.
Interface to allow the abstraction of the rawtransport information.
Provides get and set methods for properties. Canbe used to replace reflection for serialization aware classes.
Abstract class which holds common methods and members that are used by the transport layers.
ClassesDescription
04/21/23 COT6905 Directed Independent Study 27
Backup
04/21/23 COT6905 Directed Independent Study 28
WSDL 2.0 Structure
<description> -- XML target namespaces
<documentation> -- Simple text description of the WSDL WS</documentation>
<types> -- Describes the message and message types used in the WSDL</types>
<interface> -- Defines the interface of a WS as a set of abstract operations</interface>
<binding> -- A binding specifies concrete message format and transmission protocol details for an interface and fault in the operation
</binding>
<service> -- Describes a single interface that the service will support and describes al list of endpoints where the service can be found
</service>
</description>