SlideShare a Scribd company logo
Web Services OverviewWeb Services Overview
Prabhat GangwarPrabhat Gangwar
Software DevloperSoftware Devloper
Genx Info TechnologiesGenx Info Technologies
AssignmentsAssignments
 Download and install Tomcat (again).Download and install Tomcat (again).
• http://jakarta.apache.org/tomcat/http://jakarta.apache.org/tomcat/
• You will need two tomcat servers.You will need two tomcat servers.
 Install Apache Axis.Install Apache Axis.
• Use “HappyAxis” to make sure you have done soUse “HappyAxis” to make sure you have done so
correctly.correctly.
• http://ws.apache.org/axis/http://ws.apache.org/axis/
 Design and deploy a sample web service.Design and deploy a sample web service.
 Write a client application to use the web service.Write a client application to use the web service.
 Use Google and Amazon WSDL to design yourUse Google and Amazon WSDL to design your
own client.own client.
This Lecture…This Lecture…
 This lecture is intended toThis lecture is intended to introduceintroduce
the main concepts of Web Services.the main concepts of Web Services.
 We will also look at some thingsWe will also look at some things
((SOAP, WSDLSOAP, WSDL) in detail…) in detail…
 But the primary purpose is toBut the primary purpose is to
introduce topics that will all beintroduce topics that will all be
covered incovered in greater detailgreater detail in futurein future
lectures.lectures.
What Are Web Services?What Are Web Services?
 Web services framework is an XML-based distributedWeb services framework is an XML-based distributed
object/service/component system.object/service/component system.
• SOAP, WSDLSOAP, WSDL, WSIL, UDDI, WSIL, UDDI
• Intended to supportIntended to support machine-to-machinemachine-to-machine interactions over theinteractions over the
network.network.
 Basic ideas is to build anBasic ideas is to build an platform and programmingplatform and programming
language-independentlanguage-independent distributed invocation system out ofdistributed invocation system out of
existingexisting Web standardsWeb standards..
• Most standards defined by W3C, Oasis (IP considerations)Most standards defined by W3C, Oasis (IP considerations)
• Interoperability really works, as long as you can map XMLInteroperability really works, as long as you can map XML
message to a programming language type, structure, class,message to a programming language type, structure, class,
etc.etc.
 Very loosely defined, when compared toVery loosely defined, when compared to CORBACORBA, etc., etc.
 Inherit both good and bad of the webInherit both good and bad of the web
• Scalable, simple, distributedScalable, simple, distributed
• But no centralized management, system is inefficient, must beBut no centralized management, system is inefficient, must be
tolerant of failures.tolerant of failures.

Recommended for you

Why we chose mongodb for guardian.co.uk
Why we chose mongodb for guardian.co.ukWhy we chose mongodb for guardian.co.uk
Why we chose mongodb for guardian.co.uk

The document discusses the Guardian's transition from using relational databases to NoSQL databases like MongoDB. It describes the early, mid, and modern periods of the Guardian's technology stack, moving from bespoke systems to vendor CMS platforms to monolithic Java applications. Problems with scaling and complexity motivated experimenting with partial NoSQL solutions and APIs. MongoDB was ultimately chosen as it allows flexible schemas, complex queries, and easy scaling similar to relational databases but with simpler implementation. The first project to use MongoDB is replacing the user identity system stored in Oracle.

mongodbguardiancouk
MEAN.js Workshop
MEAN.js WorkshopMEAN.js Workshop
MEAN.js Workshop

My workshop at Software Architect 2015: A full day about angular js, node, express and mongoDB. You could find the code: https://github.com/habmic/MeanDemoCode

javascripthtml5token
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoC

Spring Frame Work Introduction to Spring Framework for Enterprise IoC means Inversion of Container Spring is the most popular framework which is development website and web design and development.

 
by ASG
spring intro iocspring frame workintroduction to spring
Basic Architectures:Basic Architectures:
Servlets/CGI and Web ServicesServlets/CGI and Web Services
Browser
Web
Server
HTTP GET/POST
DB
JDBC
Web
Server
DB
JDBC
Browser
Web
Server
SOAP
GUI
Client
SOAP
WSDL
WSDL
WSDL
WSDL
Explanation of Previous SlideExplanation of Previous Slide
 The diagram on the left represents a standardThe diagram on the left represents a standard
web application.web application.
• Browsers converse with web servers using HTTPBrowsers converse with web servers using HTTP
GET/POST methods.GET/POST methods.
• Servlets or CGI scripts process the parameters and takeServlets or CGI scripts process the parameters and take
action, like connect to a DB.action, like connect to a DB.
• Examples:Examples: Google, AmazonGoogle, Amazon
 On the right, we have a Web services system.On the right, we have a Web services system.
• Interactions may be either through the browser orInteractions may be either through the browser or
through a desktop client (Java Swing, Python, Windows,through a desktop client (Java Swing, Python, Windows,
etc.)etc.)
• I will explain how to do this in several more lectures.I will explain how to do this in several more lectures.
• Examples:Examples: Google, AmazonGoogle, Amazon
Some TerminologySome Terminology
 The diagram on the left is called aThe diagram on the left is called a client/serverclient/server
system.system.
 The diagram on the right is called aThe diagram on the right is called a multi-tieredmulti-tiered
architecture.architecture.
 SOAPSOAP: Simple Object Access Protocol: Simple Object Access Protocol
• XML Message format between client and service.XML Message format between client and service.
 WSDLWSDL: Web Service Description Language.: Web Service Description Language.
• Describes how the service is to be usedDescribes how the service is to be used
• Compare (for example) to Java Interface.Compare (for example) to Java Interface.
• Guideline for constructing SOAP messages.Guideline for constructing SOAP messages.
• WSDL is an XML language for writingWSDL is an XML language for writing ApplicationApplication
Programmer InterfacesProgrammer Interfaces (APIs).(APIs).
Amazon and Google ExperimentAmazon and Google Experiment
with Web Serviceswith Web Services
 Both Google and Amazon have conductedBoth Google and Amazon have conducted
open experiments with Web services.open experiments with Web services.
 Why? To allow partners to develop customWhy? To allow partners to develop custom
user interfaces and applications that workuser interfaces and applications that work
Google and Amazon data and services.Google and Amazon data and services.
 You can download their APIs and try them.You can download their APIs and try them.
• http://www.google.com/apis/http://www.google.com/apis/
• http://www.amazon.com/webserviceshttp://www.amazon.com/webservices

Recommended for you

Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJs

The document discusses Node.js and how it provides a runtime environment and libraries for building server-side JavaScript applications. It describes key Node.js components like the V8 JavaScript engine, libuv library, and non-blocking I/O. It also covers the Node package manager NPM and how Express.js is a web framework built on Node.js that simplifies building web apps and APIs using middleware, routing, and other features. The document advocates for building RESTful APIs that follow best practices like using a uniform interface, being stateless and cacheable.

javascriptapirest
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive

Learn the best practices and advanced techniques. * Passing data to client libs, use the data attribute * Expression contexts, choose wisely * Use statement best practices, what fits best your needs * Template & Call statements advanced usage * Parameters for sub-resources, featuring resource attributes and synthetic resources

aem 6.2adobe experience managersightly
Charles Nutter Presentations
Charles Nutter PresentationsCharles Nutter Presentations
Charles Nutter Presentations

Charles Oliver Nutter gave a presentation on JRuby on Rails. He discussed how JRuby allows Ruby code to run on the Java Virtual Machine and be integrated with Java libraries and frameworks. This allows Rails developers to utilize Java features and libraries and allows Java developers to use the Rails framework. Nutter highlighted several demos of JRuby on Rails, including calling Java code from Ruby and using the ActiveRecord pattern with JDBC. He concluded that while still a work in progress, JRuby on Rails enables the benefits of both Ruby on Rails and the Java ecosystem.

Why Use Web Services?Why Use Web Services?
 Web services provide a cleanWeb services provide a clean separationseparation
between a capability and its user interface.between a capability and its user interface.
 This allows a company (Google) with aThis allows a company (Google) with a
sophisticated capability and huge amountssophisticated capability and huge amounts
of data to make that capability available toof data to make that capability available to
its partners.its partners.
• ““Don’t worry about howDon’t worry about how PageRankPageRank works orworks or
web robots or data storage. We will do that.web robots or data storage. We will do that.
You just use this WSDL API to build your clientYou just use this WSDL API to build your client
application to use our search engine.”application to use our search engine.”
A Google AsideA Google Aside
 Google’sGoogle’s PageRankPageRank system was developedsystem was developed
by two Stanford grad students.by two Stanford grad students.
 OpenOpen algorithm published in scholarlyalgorithm published in scholarly
journals, conferences.journals, conferences.
• Previous (and lousy) search engines were allPrevious (and lousy) search engines were all
proprietary.proprietary.
 See for exampleSee for example
http://www7.scu.edu.au/programme/fullpaperhttp://www7.scu.edu.au/programme/fullpaper
When To Use Web Services?When To Use Web Services?
 Applications do not have severe restrictions onApplications do not have severe restrictions on
reliability and speedreliability and speed..
 Two or more organizations need toTwo or more organizations need to cooperatecooperate
• One needs to write an application that uses another’sOne needs to write an application that uses another’s
service.service.
 Services can beServices can be upgraded independentlyupgraded independently ofof
clients.clients.
• Google can improve PageRank implemenation withoutGoogle can improve PageRank implemenation without
telling me.telling me.
• Just don’t change the WSDL.Just don’t change the WSDL.
 Services can be easily expressed with simpleServices can be easily expressed with simple
request/responserequest/response semantics and simplesemantics and simple statestate..
• HTTP and Cookies, for example.HTTP and Cookies, for example.
Relationship to PreviousRelationship to Previous
WorkWork
Connecting to Bryan’sConnecting to Bryan’s
Lectures on XML, Java, JavaLectures on XML, Java, Java
Servlets and JSP.Servlets and JSP.

Recommended for you

Optimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMOptimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEM

Slides of my hands-on lab at MAX 2011. They explain how to optimize an HTML5 site running on a WEM instance, first quickly introducing HTML5 an WEM. Then, optimizing the CSS and JS inclusions, using the new Client Library feature. And finally, setting up the Dispatcher cache to deliver the right HTTP headers.

html5cq5wem
Java Web Services
Java Web ServicesJava Web Services
Java Web Services

The document discusses Java web services and related technologies. It provides an overview of service-oriented architecture (SOA) and web services standards like XML, SOAP, WSDL and UDDI. It also covers Java tools for working with XML and implementing RESTful web services in Java, as well as the business needs and technical challenges that web services address.

CQ 5.4 Deep-Dive
CQ 5.4 Deep-DiveCQ 5.4 Deep-Dive
CQ 5.4 Deep-Dive

This document summarizes new features in Adobe CQ 5.4 for developers. It introduces mobile device capability APIs, client libraries for websites, HTML5 video components, workflow-based reverse replication for user generated content, and integration with Adobe SiteCatalyst for analytics and targeting. The presentation provides demonstrations of mobile rendering, client library optimization, and user generated content workflows.

mobilecq5wem
XML OverviewXML Overview
 XML is a language for building languages.XML is a language for building languages.
 Basic rules: be well formed and be validBasic rules: be well formed and be valid
 Particular XML “dialects” are defined by anParticular XML “dialects” are defined by an
XML Schema.XML Schema.
• XML itself is defined by its own schema.XML itself is defined by its own schema.
 XML is extensible via namespacesXML is extensible via namespaces
 Many non-Web services dialectsMany non-Web services dialects
• RDF, SVG,GML, XForms, XHTMLRDF, SVG,GML, XForms, XHTML
 Many basic tools available: parsers, XPathMany basic tools available: parsers, XPath
and XQuery for searching/querying, etc.and XQuery for searching/querying, etc.
XML and Web servicesXML and Web services
 XML provides a natural substrate for distributedXML provides a natural substrate for distributed
computing:computing:
• Its just a data description.Its just a data description.
• Platform, programming language independent.Platform, programming language independent.
 So let’s describe the pieces.So let’s describe the pieces.
 Web Services Description Language (WSDL)Web Services Description Language (WSDL)
• Describes how to invoke a service (compare with CORBADescribes how to invoke a service (compare with CORBA
IDL).IDL).
• Can bind to SOAP, other protocols for actual invocation.Can bind to SOAP, other protocols for actual invocation.
 Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)
• Wire protocol extension for conveying RPC calls.Wire protocol extension for conveying RPC calls.
• Can be carried over HTTP, SMTP.Can be carried over HTTP, SMTP.
Web Service ArchitecturesWeb Service Architectures
 The following examples illustrate how WebThe following examples illustrate how Web
services interact with clients.services interact with clients.
 For us, a client is typically a JSP, servlet,For us, a client is typically a JSP, servlet,
or portlet that a user accesses throughor portlet that a user accesses through
browser.browser.
 You can also build other clientsYou can also build other clients
• Web serviceWeb service interoperabilityinteroperability means that clientsmeans that clients
and services can be in different programmingand services can be in different programming
languages (C/C++, python, java, etc).languages (C/C++, python, java, etc).
Browser Interface
User Interface
Server + Client
Stubs
Server plus
Service
Implementations
Backend
Resources
HTTP(S)
SOAP/HTTP(S)
Local invocation, JDBC
connection or Grid Protocol
UI Server has stubs
for all services (data
base access, job
submission, file
transfer, etc.)
A particular server
has several
service implementations.
Backend is a database,
application code plus
operating system.

Recommended for you

Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha Platform

This document provides an introduction to the Asha platform and Java ME. It discusses that Java ME is the most widespread mobile application platform, developed by Sun Microsystems and now owned by Oracle. It was designed to be a cross-platform solution for mobile devices. The Asha platform is Nokia's low-end mobile phone platform, powered by Java ME. It supports apps written in Java ME or as web apps using the Gecko rendering engine. The document provides overviews of Java ME configurations like CLDC and MIDP, and the KVM which is an optimized Java virtual machine for mobile devices.

j2meashajavame
Jsp abes new
Jsp abes newJsp abes new
Jsp abes new

JSP (JavaServer Pages) allow embedding Java code within HTML/XML pages to create dynamic web content. Key points: - JSP pages are compiled into Java servlets to generate the HTML response. This means JSP have access to full Java APIs and can be efficiently handled by the server. - It is recommended to separate presentation logic in JSP from business logic in Java classes to improve modularity. This can be done using JavaBeans, tag libraries, and MVC pattern. - Examples demonstrate using JSP scriplets and expressions to output dynamic data, JavaBeans to encapsulate data in reusable objects, and tag libraries to access beans and simplify JSP code. Form submission examples pass

jspservlet
Action-Domain-Responder: A Refinement of MVC
Action-Domain-Responder: A Refinement of MVCAction-Domain-Responder: A Refinement of MVC
Action-Domain-Responder: A Refinement of MVC

Using Model-View-Controller as a pattern to describe stateless HTTP interactions has always been a bit of a kludge. There simply hasn't been a better pattern web applications -- until now. ADR (Action-Domain-Responder) represents a refinement of generic MVC as an application architecture specifically tuned to the web. In this talk, we will discuss various patterns of overall application architecture, including MVC, MVP, PAC, DCI, RMR, and others. We will find out how the ADR pattern arises from generic MVC, and how it provides a better description of how web applications actually work. Finally, we will go over examples of how to architect an ADR application, as well as how to convert from an MVC architecture to an ADR one.

adrmvcpatterns
User Interface Server
DB Service 1
JDBC
DB
Job Sub/Mon
And File
Services
Operating and
Queuing
Systems
User Interface
DB Service 2
JDBC
DB
Host 1 Host 2 Host 3
Before Going On…Before Going On…
 In the next several slides we’ll go into theIn the next several slides we’ll go into the
details of WSDL and SOAP.details of WSDL and SOAP.
 But in practice,But in practice, you don’t need to workyou don’t need to work
directly with eitherdirectly with either..
• Most tools that I’m familiar with generate theMost tools that I’m familiar with generate the
WSDL for you from your class.WSDL for you from your class.
• SOAP messages are constructed by classes.SOAP messages are constructed by classes.
• GeneratedGenerated client stubsclient stubs will even hide SOAPwill even hide SOAP
classes behind a local “façade” that looks like aclasses behind a local “façade” that looks like a
local class but actually constructs SOAP calls tolocal class but actually constructs SOAP calls to
the remote server.the remote server.
Web ServicesWeb Services
Description LanguageDescription Language
Defines what your serviceDefines what your service
does and how it is invoked.does and how it is invoked.
WSDL OverviewWSDL Overview
 WSDL is an XML-based Interface DefinitionWSDL is an XML-based Interface Definition
Language.Language.
• You can define the APIs for all of your services in WSDL.You can define the APIs for all of your services in WSDL.
 WSDL docs are broken into five major parts:WSDL docs are broken into five major parts:
• Data definitionsData definitions (in XML) for custom types(in XML) for custom types
• Abstract message definitionsAbstract message definitions (request, response)(request, response)
• Organization of messages into “Organization of messages into “portsports” and “” and “operationsoperations””
((classes and methods).classes and methods).
• Protocol bindingsProtocol bindings (to SOAP, for example)(to SOAP, for example)
• Service point locationsService point locations (URLs)(URLs)
 Some interesting featuresSome interesting features
• A single WSDL document can describe several versionsA single WSDL document can describe several versions
of an interface.of an interface.
• A single WSDL doc can describe several related services.A single WSDL doc can describe several related services.

Recommended for you

Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google

Angular jS Introduction by Google A to Z angular introduction about Angular Framework which is single page application. Angular JS and angular is very important for single page applications.

 
by ASG
angular js introductionangular js introduction by googlea to z angular introduction
Business Applications Integration In The Cloud
Business Applications Integration In The CloudBusiness Applications Integration In The Cloud
Business Applications Integration In The Cloud

Filip Rogaczewski - Atlassian Connect Team Lead. Presentation from Gdansk University of Technology about integration business application in the cloud i.e. how to integrate 50 000+ servers together.

spartezbusiness applicationsatlassian
Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)

By using a single organizational principle, developers can easily make their project structure more predictable, extensible, and modular. The talk will discuss this one lesson, how it can be discovered from researching publicly available PHP projects, how to apply it, and how it is used (or not used) in well-known applications and frameworks.

php organizing
The Java CodeThe Java Code
public String[] execLocalCommand(Stringpublic String[] execLocalCommand(String
command) {command) {
Runtime rt = Runtime.getRuntime();Runtime rt = Runtime.getRuntime();
String stdout="",stderr="";String stdout="",stderr="";
try {try {
Process p = rt.exec(command);Process p = rt.exec(command);
BufferedReader in=BufferedReader in=
new BufferedReader(newnew BufferedReader(new
InputStreamReader(p.getInputStream()));InputStreamReader(p.getInputStream()));
BufferedReader err=BufferedReader err=
new BufferedReader(newnew BufferedReader(new
InputStreamReader(p.getErrorStream()));InputStreamReader(p.getErrorStream()));
Java Code ContinuedJava Code Continued
String line;String line;
while((line=in.readLine())!= null)while((line=in.readLine())!= null)
{stdout+=line+"n";}{stdout+=line+"n";}
in.close();in.close();
while ((line=err.readLine())!=null)while ((line=err.readLine())!=null)
{stderr+=line+"n";}{stderr+=line+"n";}
err.close();err.close();
}//End of try{}}//End of try{}
catch (Exception eio) {…}catch (Exception eio) {…}
String[] retstring=new String[2];String[] retstring=new String[2];
retstring[0]=stdout;retstring[0]=stdout;
retstring[1]=stderr;retstring[1]=stderr;
return retstring;return retstring;
} //End of method} //End of method
WSDL Example: JobWSDL Example: Job
SubmissionSubmission
 Our example is a simple service that canOur example is a simple service that can
executes local (to the server) commands.executes local (to the server) commands.
 Service implementation (in Java) has aService implementation (in Java) has a
single methodsingle method
• ExecLocal takes a single string argument (theExecLocal takes a single string argument (the
command to exec)command to exec)
• Returns a 2D string array (standard out andReturns a 2D string array (standard out and
error).error).
 The WSDL maps to a Java interface in thisThe WSDL maps to a Java interface in this
case.case.
The Full WSDLThe Full WSDL
 The following slide contains the WSDLThe following slide contains the WSDL
definition for the Job Submit service.definition for the Job Submit service.
• I omitted some data definitions to get into oneI omitted some data definitions to get into one
page with a decent font.page with a decent font.
 As you can see, WSDL is veryAs you can see, WSDL is very verboseverbose
• Typically, you don’t write WSDLTypically, you don’t write WSDL
• This file was actually generated from my JavaThis file was actually generated from my Java
class byclass by Apache AxisApache Axis..
 We will go through the parts of the doc inWe will go through the parts of the doc in
some detail.some detail.

Recommended for you

AEM Sightly Template Language
AEM Sightly Template LanguageAEM Sightly Template Language
AEM Sightly Template Language

Last updated on Dec 12, 2014 The Sightly template language, shipped with Adobe Experience Manager 6.0, simplifies a lot the component development workflow by allowing front-end developers to edit components themselves directly. Learn about the main features of that template language, and about the tools available to make project development work more efficient.

sightlyadobe experience manageraem
Cell architecture
Cell architectureCell architecture
Cell architecture

This document proposes a cell architecture for large scale services. It begins by discussing basic architectures and their overhead issues. It then presents a query-off architecture that separates reads and writes across master and slave servers. This helps address workloads where reads outnumber writes. The document then introduces cell architecture, where users are partitioned into cells that each have their own full-set of servers to handle all requests. This allows scaling while limiting failures to specific cells. Benefits include easy extension and isolation of failures, while liabilities include needing more servers to build full cells.

Oracle real application_cluster
Oracle real application_clusterOracle real application_cluster
Oracle real application_cluster

This document discusses scalable storage configuration for physics database services. It outlines challenges with storage configuration, best practices like using all available disks and striping data, and Oracle's ASM solution. The document presents benchmark data measuring performance of different storage configurations and recommendations for sizing new projects based on stress testing and benchmark data.

oracle rac. grid infrastructure
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions>
<wsdl:message name="execLocalCommandResponse">
<wsdl:message name="execLocalCommandRequest">
<wsdl:portType name="SJwsImp">
<wsdl:operation name="execLocalCommand" parameterOrder="in0">
<wsdl:input message="impl:execLocalCommandRequest"
name="execLocalCommandRequest"/>
<wsdl:output message="impl:execLocalCommandResponse"
name="execLocalCommandResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SubmitjobSoapBinding" type="impl:SJwsImp">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="execLocalCommand">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="execLocalCommandRequest">
<wsdl:output name="execLocalCommandResponse">
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SJwsImpService">
<wsdl:port binding="impl:SubmitjobSoapBinding" name="Submitjob">
</wsdl:service>
</wsdl:definitions>
WSDL Elements IWSDL Elements I
 TypesTypes: describes custom XML data types: describes custom XML data types
(optional) used in messages.(optional) used in messages.
• For OO languages, types are a limited objectFor OO languages, types are a limited object
serialization.serialization.
• We’ll see an example for defining arrays.We’ll see an example for defining arrays.
 MessageMessage: abstractly defines the messages that: abstractly defines the messages that
need to be exchanged.need to be exchanged.
• Conventionally messages are used to group requestsConventionally messages are used to group requests
and responses.and responses.
• Each method/function in the interface contains 0-1Each method/function in the interface contains 0-1
request and 0-1 response messages.request and 0-1 response messages.
• Consists ofConsists of partpart elements. Usually you need one part forelements. Usually you need one part for
each variable sent or received. Parts can either be XMLeach variable sent or received. Parts can either be XML
primitive types or custom complex types.primitive types or custom complex types.
TypesTypes for Job Submissionfor Job Submission
 Recall that the job submissionRecall that the job submission
service sends a string (theservice sends a string (the
command) and returns a 2D array.command) and returns a 2D array.
 StringsStrings are XML Schemaare XML Schema primitiveprimitive
typestypes, so we don’t need a special, so we don’t need a special
definition in our WSDL.definition in our WSDL.
 ArraysArrays areare not primitive typesnot primitive types. They. They
are defined in the SOAP schema, soare defined in the SOAP schema, so
we will import that definition.we will import that definition.
• In other words, SOAP has rules for arrayIn other words, SOAP has rules for array
encoding; vanilla XML does not.encoding; vanilla XML does not.
Example: WSDLExample: WSDL typestypes for Customfor Custom
Data DefinitionData Definition
<wsdl:types>
<schema targetNamespace="http://.../GCWS/services/Submitjob"
xmlns:impl="http://.../GCWS/services/Submitjob"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="ArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="xsd:string[]" />
</restriction>
</complexContent>
</complexType>
<element name="ArrayOf_xsd_string" nillable="true"
type="impl:ArrayOf_xsd_string" />
</schema>
</wsdl:types>

Recommended for you

Json
JsonJson
Json

This document discusses JSON (JavaScript Object Notation), which is a lightweight data format that is easy to parse and generate. It is built upon two structures - a collection of name/value pairs and an ordered list of values. The document provides examples of JSON encoding and decoding in JavaScript and PHP. It notes that JSON parsing is faster than XML in AJAX applications.

java object notationjson
Leadership
LeadershipLeadership
Leadership

The document discusses leadership and the differences between managers and leaders. It provides details on: - The key roles of managers as focusing on processes and ensuring things are done correctly, while leaders focus on inspiring and motivating people. - Common activities of planning, organizing, directing and controlling that both managers and leaders undertake, but with managers ensuring rules are followed and leaders shaping the vision and strategy. - Different leadership styles including delegating, participating, selling, and telling based on the level of direction and relationship with followers. - The importance for new leaders to learn quickly, build new relationships, and manage expectations during the transition period.

leadershipmanagementskills
Java
Java Java
Java

This document introduces Java programming concepts including object-oriented programming, primitive data types, control structures, predefined classes like Math and String, writing and documenting classes, and summarizing key characteristics of Java like being platform independent. It also covers topics like processing Java code, defining and using classes and objects, arrays, input/output streams, and more.

oopsjava
What Does It Mean?What Does It Mean?
 We start with some usefulWe start with some useful
namespace definitions.namespace definitions.
 We next import the SOAP schemaWe next import the SOAP schema
• It has the array definitions we need.It has the array definitions we need.
 Finally, we define our own local XMLFinally, we define our own local XML
complex type, ArrayOf_xsd_string.complex type, ArrayOf_xsd_string.
• This extends the SOAP array typeThis extends the SOAP array type
• We restrict this to String arrays.We restrict this to String arrays.
MessageMessage Elements for JobElements for Job
Submission ServiceSubmission Service
 Our service implementation has one method ofOur service implementation has one method of
the form (in Java)the form (in Java)
public String[] execLocalCommand(String cmd)public String[] execLocalCommand(String cmd)
 This will require one “request” message and oneThis will require one “request” message and one
“response” message.“response” message.
 Each message has oneEach message has one part:part:
• Request message must send the String cmd.Request message must send the String cmd.
• Response must get back the String[] array (definedResponse must get back the String[] array (defined
previously as a custom type).previously as a custom type).
 If we had to pass two input variables, ourIf we had to pass two input variables, our
“request” message would need two part“request” message would need two part
elements.elements.
 Note the name attributes of messages areNote the name attributes of messages are
important!important!
Message Examples for JobMessage Examples for Job
Submission ServiceSubmission Service
<wsdl:message
name="execLocalCommandResponse">
<wsdl:part
name="execLocalCommandReturn"
type="impl:ArrayOf_xsd_string" />
</wsdl:message>
<wsdl:message
name="execLocalCommandRequest">
<wsdl:part name="in0" type="xsd:string" />
</wsdl:message>
portTypesportTypes
 portTypeportType elements map messages toelements map messages to
operationsoperations..
 You can think of portType==class,You can think of portType==class,
operation==class methods.operation==class methods.
 Operations can contain input, output,Operations can contain input, output,
and/or fault bindings for messages.and/or fault bindings for messages.
 An operation may support of the followingAn operation may support of the following
message styles:message styles:
• One-way: request onlyOne-way: request only
• Two-way: request/responseTwo-way: request/response
• Solicit-response: server “push” and client responseSolicit-response: server “push” and client response
• Notification: one-way server pushNotification: one-way server push

Recommended for you

My sql basic
My sql basicMy sql basic
My sql basic

MySQL is an open-source relational database management system. It stores data in separate tables and uses SQL for querying and modifying the data. MySQL has a client-server architecture and supports different storage engines. Common tools for interacting with MySQL include the mysql command line client, mysqldump for backups, and graphical tools like phpMyAdmin.

database librarymysqldatabase
Soa
SoaSoa
Soa

A service oriented architecture (SOA) organizes software into business services that are network accessible and executable. Key characteristics include quality of service specifications, discoverable services and data catalogs, and use of industry standards. A SOA breaks up monolithic systems into reusable components called services that can be more easily maintained and replaced. Implementing a SOA requires organizing infrastructure, data, security, computing, communication, and application services to maximize reuse across the enterprise.

soasystemservice oriented architecture
Women empowerment
Women empowermentWomen empowerment
Women empowerment

Women empowerment refers to women gaining power and control over their own lives and being able to achieve their goals. However, women face many barriers to empowerment such as cultural norms, gender discrimination, lack of education, financial constraints, and an inability to take risks. These barriers can be overcome by focusing on education, health, self-reliance, justice, sensitivity, and equality for women.

women empowerment
portType for JobSubmitportType for JobSubmit
 We previously defined the messagesWe previously defined the messages
and types needed. Now we bindand types needed. Now we bind
them into the portType structure.them into the portType structure.
 PortType names are importantPortType names are important
• Will be referenced byWill be referenced by bindingbinding element.element.
 Note names of previously definedNote names of previously defined
messages are used as references inmessages are used as references in
the operations.the operations.
<wsdl:portType name="SJwsImp">
<wsdl:operation name="execLocalCommand"
parameterOrder="in0">
<wsdl:input
message="impl:execLocalCommandRequest"
name="execLocalCommandRequest" />
<wsdl:output
message="impl:execLocalCommandResponse"
name="execLocalCommandResponse" />
</wsdl:operation>
</wsdl:portType>
Example WSDL NuggetExample WSDL Nugget
Some Notes on the PortTypeSome Notes on the PortType
DefinitionDefinition
 PortTypes refer to messages by namePortTypes refer to messages by name
• The message attribute in <input> andThe message attribute in <input> and
<output> elements of <operation> refer to<output> elements of <operation> refer to
the name attributes of the previously definedthe name attributes of the previously defined
messages.messages.
• The operation and portType names willThe operation and portType names will
similarly be used for reference in forthcomingsimilarly be used for reference in forthcoming
tags.tags.
 Also note “parameterOrder” does what youAlso note “parameterOrder” does what you
would expect. For the current example,would expect. For the current example,
there is only one input parameter.there is only one input parameter.
PortType BindingsPortType Bindings
 portTypes are abstract interfaceportTypes are abstract interface
definitions.definitions.
• Don’t say anything about how to invoke aDon’t say anything about how to invoke a
remote method.remote method.
 Remote invocations are defined inRemote invocations are defined in bindingbinding
elements.elements.
 Binding elements are really just placeBinding elements are really just place
holders that are extended for specificholders that are extended for specific
protocolsprotocols
• WSDL spec provides SOAP, HTTP GET/POST,WSDL spec provides SOAP, HTTP GET/POST,
and MIME extension schema examples.and MIME extension schema examples.

Recommended for you

Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skills

This document discusses effective communication skills. It defines communication as the process of transmitting information between people through words, actions, and other means. The objectives are to understand communication, overcome barriers, practice active listening, and improve verbal and nonverbal skills. Common communication methods include spoken words, writing, visuals, and body language. Barriers to effective communication include noise, inappropriate mediums, assumptions, emotions, language differences, and poor listening. The document provides tips for improving communication skills such as speaking clearly, actively listening, using simple language, being aware of body language, and interacting with others.

communication skillsbody language
Middleware systems overview and introduction
Middleware systems overview and introductionMiddleware systems overview and introduction
Middleware systems overview and introduction

Middleware systems provide abstractions and services to facilitate the development of distributed applications across heterogeneous networks. They include services for remote communication, messaging, transactions, naming, and more. Common middleware platforms include CORBA, RMI, J2EE, Web Services, and others that aggregate various services. Middleware aims to make distributed application development easier and more efficient by masking heterogeneity and managing complexity inherent in distributed systems.

middleware technology
Nutrient
NutrientNutrient
Nutrient

Here are the answers to the nutrient basics quiz: 1. Water 2. Protein 3. Fat 4. Carbohydrate

nutrition foodhealthy food
SOAP Bindings for JobSubmitSOAP Bindings for JobSubmit
ServiceService
 Note that the binding element contains a mixtureNote that the binding element contains a mixture
of tags from different namespaces (wsdl andof tags from different namespaces (wsdl and
wsdlsoap).wsdlsoap).
 WSDL child elements forWSDL child elements for bindingbinding element areelement are
operation, input,operation, input, andand output.output.
 WSDLSOAP elements are from a different XMLWSDLSOAP elements are from a different XML
schema (a new one, neither WSDL nor SOAP).schema (a new one, neither WSDL nor SOAP).
• This is how you extend WSDL bindings: define a newThis is how you extend WSDL bindings: define a new
schema that gives mapping instructions from WSDL toschema that gives mapping instructions from WSDL to
the protocol of choice.the protocol of choice.
 The binding element name is important, will beThe binding element name is important, will be
used as a reference by the final port binding.used as a reference by the final port binding.
<wsdl:binding
name="SubmitjobSoapBinding" type="impl:SJwsImp">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="execLocalCommand">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="execLocalCommandRequest">
<wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
namespace="http://.../GCWS/services/Submitjob"
use="encoded" />
</wsdl:input>
<wsdl:output name="execLocalCommandResponse">
<wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/
namespace=http://.../GCWS/services/Submitjob
use="encoded" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
A Closer Look at SOAP BindingA Closer Look at SOAP Binding
<wsdlsoap:body<wsdlsoap:body
encodingStyle=encodingStyle=http://schemas.xmlsoap.org/http://schemas.xmlsoap.org/
soap/encoding/soap/encoding/
namespace=namespace=http://.../GCWS/services/Submihttp://.../GCWS/services/Submi
tjobtjob use="use="encodedencoded" />" />
 All this really means is “encode the message byAll this really means is “encode the message by
the rules in encodingStyle and put it in the SOAPthe rules in encodingStyle and put it in the SOAP
body.”body.”
 The bindings are just instructions that must beThe bindings are just instructions that must be
implemented by the SOAP message generator.implemented by the SOAP message generator.
Service and Port DefinitionsService and Port Definitions
 So far, we have defined the classSo far, we have defined the class
method interfaces (portTypes) andmethod interfaces (portTypes) and
the rules for binding to a particularthe rules for binding to a particular
protocol.protocol.
 PortPort elements define how theelements define how the
bindings (and thus the portTypes)bindings (and thus the portTypes)
are associated with a particularare associated with a particular
server.server.
 TheThe serviceservice element collectselement collects ports.ports.

Recommended for you

Introducing adf business components
Introducing adf business componentsIntroducing adf business components
Introducing adf business components

The document provides an overview of ADF Business Components (ADF BC), which is a Java and XML based framework for developing business logic, queries, transaction handling, and data access in a reusable way. It describes the main components of ADF BC including entity objects, view objects, application modules, associations, and domains. Entity objects represent database tables or views, view objects define queries over entity objects, and application modules provide transaction support. ADF BC allows business logic to be written in Java and reused across multiple interfaces for improved maintainability and performance.

adforacle
Health triangle
Health triangleHealth triangle
Health triangle

The document discusses the health triangle, which measures three aspects of health: physical, mental, and social. Physical health deals with body functioning and includes exercise, nutrition, sleep, avoiding drugs and alcohol, and maintaining a healthy weight. Mental health relates to thinking, feelings, and coping, and encompasses learning, managing stress, and avoiding mental illness. Social health involves relationships with others through public health, family, and peers. The health triangle emphasizes making good choices across all three areas to reduce disease risk and promote overall well-being.

nutrition foodhealthy lifehuman heath
clustering and load balancing
clustering and load balancingclustering and load balancing
clustering and load balancing

The document discusses load balancing techniques used to distribute workloads across multiple servers or resources. It begins with an introduction to load balancing and its benefits, such as increased capacity and continued service during failures. It then describes three main methods for load balancing in Linux: virtual server via NAT (VS/NAT), virtual server via tunneling (VS/TUN), and virtual server via direct routing (VS/DR). Each method forwards requests to servers differently while maintaining a single virtual IP address for clients. VS/NAT rewrites packets, VS/TUN uses encapsulation, and VS/DR directly routes packets on a shared LAN. The document provides examples and compares the advantages and disadvantages of each approach.

real time clusterclustering
<wsdl:service name="SJwsImpService">
<wsdl:port
binding="impl:SubmitjobSoapBinding"
name="Submitjob">
<wsdlsoap:address
location="http://.../GCWS/services/Submitjob" />
</wsdl:port>
</wsdl:service>
Service and Port Elements for theService and Port Elements for the
Job Submission ServiceJob Submission Service
ExplanationExplanation
 Note the port element’s binding attributeNote the port element’s binding attribute
points to the appropriatepoints to the appropriate bindingbinding elementelement
by name.by name.
 The only purpose of the port element is toThe only purpose of the port element is to
point to a service location (a URL). This ispoint to a service location (a URL). This is
done by extension (SOAP in this case.)done by extension (SOAP in this case.)
 Ports are child elements of thePorts are child elements of the serviceservice
element. A service can contain one orelement. A service can contain one or
more ports.more ports.
• Note the value of multiple ports: a singleNote the value of multiple ports: a single
portType may correspond to several ports,portType may correspond to several ports,
each with a different protocol binding andeach with a different protocol binding and
service point.service point.
WSDL TriviaWSDL Trivia
 The schema rules allow all of the elements weThe schema rules allow all of the elements we
have discussed to appear zero or more times.have discussed to appear zero or more times.
 A single WSDL file may contain many portTypesA single WSDL file may contain many portTypes
(although this is not usual).(although this is not usual).
• You may want to do this to support multiple interfaceYou may want to do this to support multiple interface
definitions of a service for backward compatibility.definitions of a service for backward compatibility.
 Multiple ports may also be used to provideMultiple ports may also be used to provide
different views of a servicedifferent views of a service
• One portType defines the interface.One portType defines the interface.
• Another provides access to metadata about the service.Another provides access to metadata about the service.
• Yet another may define how the service interacts withYet another may define how the service interacts with
other servicesother services via notification/event systemsvia notification/event systems..
Simple Object AccessSimple Object Access
ProtocolProtocol
A message format forA message format for
exchanging structured, typedexchanging structured, typed
informationinformation

Recommended for you

Human values
Human valuesHuman values
Human values

Human values are important ideals shared by a culture regarding what is good and desirable. These values determine whether people feel desire, happy, unhappy, prosperous, or deprived. Fulfilling human aspirations requires understanding our relationships with other people and being in mutual happiness and prosperity. To live with continuous happiness and prosperity, we must understand ourselves and live in harmony at the individual, family, societal, and environmental levels.

human values
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture

The architecture of a software system defines that system in terms of computational components and interactions among those components.

software architecture
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers

This document provides an introduction and overview of Java Database Connectivity (JDBC). It discusses what JDBC is, the different types of JDBC drivers, how to connect to databases using JDBC, and how to execute SQL statements and process result sets. It also covers how to access database metadata and provides examples of using JDBC to connect to and query a Microsoft Access database.

jdbc driversdatabasedatabase library
SOAP BasicsSOAP Basics
 SOAP is often thought of as a protocol extensionSOAP is often thought of as a protocol extension
for doing RPC over HTTP.for doing RPC over HTTP.
 This is not completely accurate: SOAP is an XMLThis is not completely accurate: SOAP is an XML
message format for exchanging structured, typedmessage format for exchanging structured, typed
data.data.
 It may be used for RPC in client-serverIt may be used for RPC in client-server
applications but is also suitable for messagingapplications but is also suitable for messaging
systems (like JMS) that follow one-to-many (orsystems (like JMS) that follow one-to-many (or
publish-subscribe) models.publish-subscribe) models.
 SOAP is not a transport protocol. You mustSOAP is not a transport protocol. You must
attach your message to a transport mechanismattach your message to a transport mechanism
like HTTP.like HTTP.
SOAP StructureSOAP Structure
 A SOAP message is contained in anA SOAP message is contained in an
envelop.envelop.
 The envelop element in turn containThe envelop element in turn contain
(in order)(in order)
• An optionalAn optional headerheader with one or morewith one or more
child entrieschild entries..
• AA bodybody element that can contain one orelement that can contain one or
more child entries. These child entriesmore child entries. These child entries
may contain arbitrary XML data.may contain arbitrary XML data.
SOAP HeadersSOAP Headers
 Headers are really just extension pointsHeaders are really just extension points
where you can include elements fromwhere you can include elements from
other namespaces.other namespaces.
• i.e., headers can contain arbitrary XML.i.e., headers can contain arbitrary XML.
 Header entries may optionally have aHeader entries may optionally have a
“mustUnderstand” attribute.“mustUnderstand” attribute.
• mustUnderstand=1 means the messagemustUnderstand=1 means the message
recipient must process the header element.recipient must process the header element.
• If mustUnderstand=0 or is missing, the headerIf mustUnderstand=0 or is missing, the header
element is optional.element is optional.
SOAP BodySOAP Body
 Body entries are really just placeholdersBody entries are really just placeholders
for arbitrary XML from some otherfor arbitrary XML from some other
namespace.namespace.
 The body contains the XML message thatThe body contains the XML message that
you are transmitting.you are transmitting.
 The message format is not specified byThe message format is not specified by
SOAP.SOAP.
• The <Body></Body> tag pairs are just a wayThe <Body></Body> tag pairs are just a way
to notify the recipient that the actual XMLto notify the recipient that the actual XML
message is contained therein.message is contained therein.
• The recipient decides what to do with theThe recipient decides what to do with the
message.message.

Recommended for you

Mule overview-ppt
Mule overview-pptMule overview-ppt
Mule overview-ppt

The document discusses the open-source Mule Enterprise Service Bus (ESB). Mule is an ESB that uses a staged event-driven architecture (SEDA) and non-blocking Java NIO to move data between different endpoints and applications in a flexible way. The core Mule concepts include connectors that interface with endpoints, routers that route messages, filters that filter messages, and transformers that transform message formats.

mule softmule enterprise service busmule esb
Mule and web services
Mule and web servicesMule and web services
Mule and web services

Mule is an open source ESB that can be used to integrate a bookstore application with web services and email. It includes connectors for files, web services using CXF, and email. The document describes how to build a SOAP web service with JAX-WS, generate a client, and configure Mule flow to read a CSV file and publish book data to the web service. It also covers sending order confirmations from the web service to email using transformers and an SMTP endpoint.

mule esbmule soft
soa
soasoa
soa

This document provides an introduction to distributed architectures and service-oriented architectures (SOAs). It discusses traditional programming models and how distributed programming models address some of their limitations. It then introduces some key SOA concepts, including the roles of standards organizations and definitions of SOA. It also provides examples to illustrate XML-based architectures and how they can address issues like decoupling data from formatting and reusability.

soa
Example MessagesExample Messages
 Recall the WSDL interface for “SubmitJob”Recall the WSDL interface for “SubmitJob”
• Sends one string commandSends one string command
• Returns array of strings for standard out and error.Returns array of strings for standard out and error.
 The envelop is decorated with a few usefulThe envelop is decorated with a few useful
namespacesnamespaces::
• soapenv defines the versionsoapenv defines the version
• xsd is the Schema definition itselfxsd is the Schema definition itself
• xsi defines some useful constants.xsi defines some useful constants.
 The body is just an arbitrary XMLThe body is just an arbitrary XML
fragment.fragment.
• Assumes the recipient knows what this means.Assumes the recipient knows what this means.
• Recipient must looks up the ExecLocalCommand operation inRecipient must looks up the ExecLocalCommand operation in
the JobSubmit service and passes it one string argument.the JobSubmit service and passes it one string argument.
• The ns1 namespace tells the recipient the WSDL namespaceThe ns1 namespace tells the recipient the WSDL namespace
that defines the service.that defines the service.
• xsi:type lets the recipient know that the arbitrary XML elementxsi:type lets the recipient know that the arbitrary XML element
in0 is in fact a string, as defined by the XML Schema.in0 is in fact a string, as defined by the XML Schema.
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:execLocalCommand
soapenv:encodingStyle
="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1
="http://.../GCWS/services/Submitjob/GCWS/services/Submitjob">
<in0 xsi:type="xsd:string">/usr/bin/csh /tmp/job.script</in0>
</ns1:execLocalCommand>
</soapenv:Body>
</soapenv:Envelope>
SOAP RequestSOAP Request
Example ResponseExample Response
 The structure is the same as the request.The structure is the same as the request.
 The interesting thing here is that theThe interesting thing here is that the
request returns a 2-element array of tworequest returns a 2-element array of two
strings.strings.
• Arrays not defined by XML schemaArrays not defined by XML schema
• SOAP encoding does define arrays, so useSOAP encoding does define arrays, so use
xsi:type to point to this definition.xsi:type to point to this definition.
• <item></item> surrounds each array<item></item> surrounds each array
element.element.
 Note that arbitrary XML returns canNote that arbitrary XML returns can
likewise be encoded this way.likewise be encoded this way.
• Use xsi:type to point to a schema.Use xsi:type to point to a schema.
<soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:execLocalCommandResponse
soapenv:encodingStyle=
http://schemas.xmlsoap.org/soap/encoding/
xmlns:ns1="http://../services/Submitjob">
<execLocalCommandReturn xsi:type="soapenc:Array“
soapenc:arrayType="xsd:string[2]"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item></item> <item></item>
</execLocalCommandReturn>
</ns1:execLocalCommandResponse>
</soapenv:Body>
</soapenv:Envelope>
SOAP ResponseSOAP Response

Recommended for you

WT Module-3.pptx
WT Module-3.pptxWT Module-3.pptx
WT Module-3.pptx

The document provides an overview of JavaScript topics including what JavaScript is, where it is used, syntax features like variables, conditionals, and loops. It also discusses JavaScript design principles like progressive enhancement and graceful degradation. Key JavaScript concepts like objects, arrays, functions, and built-in objects like String, Math, and Date are described. The document is a module syllabus that introduces foundational JavaScript concepts.

web technology
API Description Languages: Which Is The Right One For Me?
 API Description Languages: Which Is The Right One For Me?  API Description Languages: Which Is The Right One For Me?
API Description Languages: Which Is The Right One For Me?

The document discusses and compares different API description languages (APIs), including RAML and Swagger. It provides an overview of each tool's features and capabilities. The document also shares the author's experiences using RAML and Swagger to describe sample APIs. While both APIs are useful for documentation, the author found RAML better suited for designing APIs first before coding, while Swagger integrates more tightly with code.

apicon
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages

Just a few years back, lack of a standard way to document, govern or describe a contract for the APIs acted as a deterrent to API adoption within the enterprise. WSDL 2.0 and WADL provided early support, but they couldn’t truly capture the essence of RESTful APIs. Recently we have seen the emergence of several description languages. New ways to describe and document APIs have emerged such as Swagger, RAML, API Blueprint and others, each taking a slightly different approach.

application programming interfaceramlswagger
Developing WebDeveloping Web
ServicesServices
Using Apache Axis to developUsing Apache Axis to develop
Java implementations of WebJava implementations of Web
services.services.
Web Service DevelopmentWeb Service Development
ToolsTools
 Web service toolkits exist for variousWeb service toolkits exist for various
programming languages:programming languages:
• C++,Python, Perl, various MicrosoftC++,Python, Perl, various Microsoft
.NET kits..NET kits.
 We’ll concentrate on building JavaWe’ll concentrate on building Java
Web services with Apache Axis.Web services with Apache Axis.
 Language and implementationLanguage and implementation
interoperability is addressed throughinteroperability is addressed through
WS-I.WS-I.
• http://www.ws-i.org/http://www.ws-i.org/
Apache Axis OverviewApache Axis Overview
 Apache Axis is a toolkit for converting JavaApache Axis is a toolkit for converting Java
applications into Web services.applications into Web services.
 Axis service deployment tools allow you toAxis service deployment tools allow you to
publish your service in a particularpublish your service in a particular
application server (Tomcat).application server (Tomcat).
 Axis client tools allow you to convertAxis client tools allow you to convert
WSDL into client stubs.WSDL into client stubs.
 Axis runtime tools accept incoming SOAPAxis runtime tools accept incoming SOAP
requests and redirect them to therequests and redirect them to the
appropriate service.appropriate service.
Developing and Deploying aDeveloping and Deploying a
ServiceService
 Download and install Tomcat and Axis.Download and install Tomcat and Axis.
 Write a Java implementationWrite a Java implementation
• Our SubmitJob is a simple example but services can getOur SubmitJob is a simple example but services can get
quite complicated.quite complicated.
• Compile it into Tomcat’s classpath.Compile it into Tomcat’s classpath.
 Write a deployment descriptor (WSDD) for yourWrite a deployment descriptor (WSDD) for your
service.service.
• Will be used by Axis runtime to direct SOAP calls.Will be used by Axis runtime to direct SOAP calls.
 Use Axis’s AdminClient tool to install your WSDDUse Axis’s AdminClient tool to install your WSDD
file.file.
• The tells the axis servlet to load your class and directThe tells the axis servlet to load your class and direct
SOAP requests to it.SOAP requests to it.
 That’s it.That’s it.
• Axis will automatically generate the WSDL for yourAxis will automatically generate the WSDL for your
service.service.

Recommended for you

API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages

This document discusses API description languages (APIs), comparing Swagger and RAML. It provides an overview of each specification and demonstrates how to define a sample wishlist API using Swagger via swagger-node-express and RAML. While both work well for RESTful APIs, RAML allows for more robust modeling and top-down design capabilities. The document considers issues like documentation approaches and generating documentation from code versus design.

application programming interfaceapi
WTA-MODULE-4.pptx
WTA-MODULE-4.pptxWTA-MODULE-4.pptx
WTA-MODULE-4.pptx

This document provides an overview of JavaScript, including: - JavaScript can run in browsers without needing Java and is used for client-side scripting. It allows dynamic interactions with web pages. - JavaScript code can be included inline, embedded in <script> tags, or linked externally from .js files. External is preferred for maintenance. - Variables, data types, operators, and control structures are explained. Objects are collections of properties and methods. - Client-side scripting benefits include offloading processing to clients and faster responses to user events. Disadvantages include lack of JavaScript support and cross-browser inconsistencies. - AJAX made JavaScript more important by enabling asynchronous data requests without blocking the browser.

Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack

The document discusses the Apache SOA stack and debunks some myths about SOA. It provides an overview of the Enterprise Service Bus (ESB) and explains why the Apache ServiceMix stack is a good choice as an ESB due to its modularity, stability, and cluster capabilities. The document also discusses how to design software and build systems for an ESB using OSGi and Maven.

soa esb java concurrency
<deployment name="Submitjob"
xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="Submitjob" provider="java:RPC">
<parameter name="scope" value="request"/>
<parameter name="className"
value="WebFlowSoap.SJwsImp"/>
<parameter name="allowedMethods"
value="execLocalCommand"/>
</service>
</deployment>
Sample WSDDSample WSDD
ExplanationExplanation
 Use Axis’s command-lineUse Axis’s command-line
AdminClient tool to deploy this to theAdminClient tool to deploy this to the
server.server.
 Axis will create a service calledAxis will create a service called
• http://your.server/services/SubmitJobhttp://your.server/services/SubmitJob
 WSDL for service is available fromWSDL for service is available from
• http://your.server/services/SubmitJob?http://your.server/services/SubmitJob?
wsdlwsdl
 A list of all services is available fromA list of all services is available from
• http://your.server/serviceshttp://your.server/services
Check your Tomcat Server
for a list of deployed
services.
WSDL generated by
inspecting the Java
implementation. Can be
download from the
server.
(XML was shown in
earlier slides)

Recommended for you

Web Development Today
Web Development TodayWeb Development Today
Web Development Today

This document provides best practices for building modern web applications. It discusses choosing server-side technologies like the LAMP stack (Linux, Apache, MySQL, PHP), which is a common and advantageous option. It also covers the Model-View-Controller design pattern, which separates an application into these components. Models manage data, Views handle presentation, and Controllers process user input and pass data between Models and Views. The document recommends unobtrusive JavaScript, CSS for layout, and implementing AJAX after non-script functionality is established on the client-side. Overall, it outlines strategies for architecting robust and maintainable web applications.

Introduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleIntroduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeople

Angular.JS is quickly becoming the dominant JavaScript framework for professional web development. This quick 3 minute introduction will brief you about Angular.js

springpeopleangular.jscertification training
As 400
As 400As 400
As 400

This document describes four primary models for developing Java applications on the AS/400: HTTP servlets, transaction serving, Domino agents, and distributed objects. It compares these models to the traditional interactive job structure and discusses how each handles system services like transactions and security. The models provide different levels of services, with distributed objects eventually providing the most complete environment similar to traditional models.

Building a Client with AxisBuilding a Client with Axis
 Obtain the WSDL file.Obtain the WSDL file.
 Generate client stubsGenerate client stubs
• Stubs look like local objects but reallyStubs look like local objects but really
convert method invocations into SOAPconvert method invocations into SOAP
calls.calls.
 Write a client application with theWrite a client application with the
stubsstubs
• Can be a Java GUI, a JSP page, etc.Can be a Java GUI, a JSP page, etc.
 Compile everything and run.Compile everything and run.
Sample Java Client CodeSample Java Client Code
/**Create SubmitJob client object and point to the/**Create SubmitJob client object and point to the
service you want to use */service you want to use */
SubmiJob sjws = newSubmiJob sjws = new
SubmitJobServiceLocator().getSubmitjob(newSubmitJobServiceLocator().getSubmitjob(new
URL(http://your.server/services/SubmitJob));URL(http://your.server/services/SubmitJob));
/** Invoke the method as if local. *//** Invoke the method as if local. */
String[] messages =String[] messages =
sjws.execLocalCommand(command);sjws.execLocalCommand(command);
Two Notes On Client StubsTwo Notes On Client Stubs
 Axis stubs convert method calls intoAxis stubs convert method calls into
SOAP requests but WSDL does notSOAP requests but WSDL does not
require the use of SOAP.require the use of SOAP.
• Web Service Invocation Framework (WSIF)Web Service Invocation Framework (WSIF)
from IBM allows flexibility of protocols. (Alekfrom IBM allows flexibility of protocols. (Alek
Slominski, IU)Slominski, IU)
 Client stubs introduce versioningClient stubs introduce versioning
problemsproblems..
• We are developing dynamic (stubless) clientsWe are developing dynamic (stubless) clients
that construct SOAP messages by inspectingthat construct SOAP messages by inspecting
WSDL at runtime.WSDL at runtime.
Web Service URLsWeb Service URLs
 JavaJava
• http://xml.apache.org/axis/http://xml.apache.org/axis/
 XSOAP: C++ and Java toolkits for WSXSOAP: C++ and Java toolkits for WS
• http://www.extreme.indiana.edu/xgws/xsoap/http://www.extreme.indiana.edu/xgws/xsoap/
 gSOAP: C++ SOAP toolkitgSOAP: C++ SOAP toolkit
• http://www.cs.fsu.edu/~engelen/soap.htmlhttp://www.cs.fsu.edu/~engelen/soap.html
 Python Web Services:Python Web Services:
• http://pywebsvcs.sourceforge.net/http://pywebsvcs.sourceforge.net/
 Perl:Perl:
• http://www.soaplite.com/http://www.soaplite.com/

Recommended for you

Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework

Rod Johnson created the Spring Framework, an open-source Java application framework. Spring is considered a flexible, low-cost framework that improves coding efficiency. It helps developers perform functions like creating database transaction methods without transaction APIs. Spring removes configuration work so developers can focus on writing business logic. The Spring Framework uses inversion of control (IoC) and dependency injection (DI) principles to manage application objects and dependencies between them.

springspring boot
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store

The document provides an overview of advanced Java topics for an industrial training course, including introductions to Java, J2EE, MVC architecture, Java Server Pages, JavaBeans, servlets, how servlets work, cookies and sessions, creating a simple servlet, and JDBC. It describes these technologies and how they are used to develop web applications and interact with databases.

education and training
API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?

SOA Software Director of API Strategy, Laura Heritage, discusses new ways to describe and document APIs have emerged such as Swagger, RAML, API Blueprint and others, each taking a slightly different approach. Please join us in this webinar to hear how these description languages differ and how to choose right one for your API.

application programming interfaceapi

More Related Content

What's hot

RubyonRails
RubyonRailsRubyonRails
RubyonRails
webuploader
 
Crx 2.2 Deep-Dive
Crx 2.2 Deep-DiveCrx 2.2 Deep-Dive
Crx 2.2 Deep-Dive
Gabriel Walt
 
Ruby Conf Preso
Ruby Conf PresoRuby Conf Preso
Ruby Conf Preso
Dan Yoder
 
Why we chose mongodb for guardian.co.uk
Why we chose mongodb for guardian.co.ukWhy we chose mongodb for guardian.co.uk
Why we chose mongodb for guardian.co.uk
Graham Tackley
 
MEAN.js Workshop
MEAN.js WorkshopMEAN.js Workshop
MEAN.js Workshop
Michael Haberman
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoC
ASG
 
Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJs
Srdjan Strbanovic
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
Gabriel Walt
 
Charles Nutter Presentations
Charles Nutter PresentationsCharles Nutter Presentations
Charles Nutter Presentations
webuploader
 
Optimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMOptimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEM
Gabriel Walt
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
Jussi Pohjolainen
 
CQ 5.4 Deep-Dive
CQ 5.4 Deep-DiveCQ 5.4 Deep-Dive
CQ 5.4 Deep-Dive
Gabriel Walt
 
Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha Platform
Jussi Pohjolainen
 
Jsp abes new
Jsp abes newJsp abes new
Jsp abes new
Ashwin Perti
 
Action-Domain-Responder: A Refinement of MVC
Action-Domain-Responder: A Refinement of MVCAction-Domain-Responder: A Refinement of MVC
Action-Domain-Responder: A Refinement of MVC
Paul Jones
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
Business Applications Integration In The Cloud
Business Applications Integration In The CloudBusiness Applications Integration In The Cloud
Business Applications Integration In The Cloud
Anna Brzezińska
 
Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)
Paul Jones
 
AEM Sightly Template Language
AEM Sightly Template LanguageAEM Sightly Template Language
AEM Sightly Template Language
Gabriel Walt
 
Cell architecture
Cell architectureCell architecture
Cell architecture
DaeMyung Kang
 

What's hot (20)

RubyonRails
RubyonRailsRubyonRails
RubyonRails
 
Crx 2.2 Deep-Dive
Crx 2.2 Deep-DiveCrx 2.2 Deep-Dive
Crx 2.2 Deep-Dive
 
Ruby Conf Preso
Ruby Conf PresoRuby Conf Preso
Ruby Conf Preso
 
Why we chose mongodb for guardian.co.uk
Why we chose mongodb for guardian.co.ukWhy we chose mongodb for guardian.co.uk
Why we chose mongodb for guardian.co.uk
 
MEAN.js Workshop
MEAN.js WorkshopMEAN.js Workshop
MEAN.js Workshop
 
1. Spring intro IoC
1. Spring intro IoC1. Spring intro IoC
1. Spring intro IoC
 
Building Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJsBuilding Killer RESTful APIs with NodeJs
Building Killer RESTful APIs with NodeJs
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
 
Charles Nutter Presentations
Charles Nutter PresentationsCharles Nutter Presentations
Charles Nutter Presentations
 
Optimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEMOptimizing HTML5 Sites with CQ5/WEM
Optimizing HTML5 Sites with CQ5/WEM
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
CQ 5.4 Deep-Dive
CQ 5.4 Deep-DiveCQ 5.4 Deep-Dive
CQ 5.4 Deep-Dive
 
Intro to Java ME and Asha Platform
Intro to Java ME and Asha PlatformIntro to Java ME and Asha Platform
Intro to Java ME and Asha Platform
 
Jsp abes new
Jsp abes newJsp abes new
Jsp abes new
 
Action-Domain-Responder: A Refinement of MVC
Action-Domain-Responder: A Refinement of MVCAction-Domain-Responder: A Refinement of MVC
Action-Domain-Responder: A Refinement of MVC
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
Business Applications Integration In The Cloud
Business Applications Integration In The CloudBusiness Applications Integration In The Cloud
Business Applications Integration In The Cloud
 
Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)Organinzing Your PHP Projects (2010 Memphis PHP)
Organinzing Your PHP Projects (2010 Memphis PHP)
 
AEM Sightly Template Language
AEM Sightly Template LanguageAEM Sightly Template Language
AEM Sightly Template Language
 
Cell architecture
Cell architectureCell architecture
Cell architecture
 

Viewers also liked

Oracle real application_cluster
Oracle real application_clusterOracle real application_cluster
Oracle real application_cluster
Prabhat gangwar
 
Json
JsonJson
Leadership
LeadershipLeadership
Leadership
Prabhat gangwar
 
Java
Java Java
My sql basic
My sql basicMy sql basic
My sql basic
Prabhat gangwar
 
Soa
SoaSoa
Women empowerment
Women empowermentWomen empowerment
Women empowerment
Prabhat gangwar
 
Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skills
Prabhat gangwar
 
Middleware systems overview and introduction
Middleware systems overview and introductionMiddleware systems overview and introduction
Middleware systems overview and introduction
Prabhat gangwar
 
Nutrient
NutrientNutrient
Nutrient
Prabhat gangwar
 
Introducing adf business components
Introducing adf business componentsIntroducing adf business components
Introducing adf business components
Prabhat gangwar
 
Health triangle
Health triangleHealth triangle
Health triangle
Prabhat gangwar
 
clustering and load balancing
clustering and load balancingclustering and load balancing
clustering and load balancing
Prabhat gangwar
 
Human values
Human valuesHuman values
Human values
Prabhat gangwar
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
Prabhat gangwar
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
Prabhat gangwar
 
Mule overview-ppt
Mule overview-pptMule overview-ppt
Mule overview-ppt
Prabhat gangwar
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
Prabhat gangwar
 

Viewers also liked (18)

Oracle real application_cluster
Oracle real application_clusterOracle real application_cluster
Oracle real application_cluster
 
Json
JsonJson
Json
 
Leadership
LeadershipLeadership
Leadership
 
Java
Java Java
Java
 
My sql basic
My sql basicMy sql basic
My sql basic
 
Soa
SoaSoa
Soa
 
Women empowerment
Women empowermentWomen empowerment
Women empowerment
 
Effective communication skills
Effective communication skillsEffective communication skills
Effective communication skills
 
Middleware systems overview and introduction
Middleware systems overview and introductionMiddleware systems overview and introduction
Middleware systems overview and introduction
 
Nutrient
NutrientNutrient
Nutrient
 
Introducing adf business components
Introducing adf business componentsIntroducing adf business components
Introducing adf business components
 
Health triangle
Health triangleHealth triangle
Health triangle
 
clustering and load balancing
clustering and load balancingclustering and load balancing
clustering and load balancing
 
Human values
Human valuesHuman values
Human values
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Jdbc drivers
Jdbc driversJdbc drivers
Jdbc drivers
 
Mule overview-ppt
Mule overview-pptMule overview-ppt
Mule overview-ppt
 
Mule and web services
Mule and web servicesMule and web services
Mule and web services
 

Similar to Web servicesoverview

soa
soasoa
WT Module-3.pptx
WT Module-3.pptxWT Module-3.pptx
WT Module-3.pptx
RamyaH11
 
API Description Languages: Which Is The Right One For Me?
 API Description Languages: Which Is The Right One For Me?  API Description Languages: Which Is The Right One For Me?
API Description Languages: Which Is The Right One For Me?
ProgrammableWeb
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
Akana
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
Akana
 
WTA-MODULE-4.pptx
WTA-MODULE-4.pptxWTA-MODULE-4.pptx
WTA-MODULE-4.pptx
ChayapathiAR
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack
Johan Edstrom
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
bretticus
 
Introduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleIntroduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeople
SpringPeople
 
As 400
As 400As 400
As 400
EMSNEWS
 
Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
Kongu Engineering College, Perundurai, Erode
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
ADEEBANADEEM
 
API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?
Akana
 
API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?
Akana
 
Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...
Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...
Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...
HostedbyConfluent
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
Spike Brehm
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
Sachin Walvekar
 
Laravel 4 presentation
Laravel 4 presentationLaravel 4 presentation
Laravel 4 presentation
Abu Saleh Muhammad Shaon
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web building
RC Morales
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
Camuel Gilyadov
 

Similar to Web servicesoverview (20)

soa
soasoa
soa
 
WT Module-3.pptx
WT Module-3.pptxWT Module-3.pptx
WT Module-3.pptx
 
API Description Languages: Which Is The Right One For Me?
 API Description Languages: Which Is The Right One For Me?  API Description Languages: Which Is The Right One For Me?
API Description Languages: Which Is The Right One For Me?
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 
WTA-MODULE-4.pptx
WTA-MODULE-4.pptxWTA-MODULE-4.pptx
WTA-MODULE-4.pptx
 
Succeding with the Apache SOA stack
Succeding with the Apache SOA stackSucceding with the Apache SOA stack
Succeding with the Apache SOA stack
 
Web Development Today
Web Development TodayWeb Development Today
Web Development Today
 
Introduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleIntroduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeople
 
As 400
As 400As 400
As 400
 
Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
 
API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?
 
API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?API Description Languages: Which is the Right One for Me?
API Description Languages: Which is the Right One for Me?
 
Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...
Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...
Wikipedia’s Event Data Platform, Or: JSON Is Okay Too With Andrew Otto | Curr...
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
Laravel 4 presentation
Laravel 4 presentationLaravel 4 presentation
Laravel 4 presentation
 
Fundamentals of Web building
Fundamentals of Web buildingFundamentals of Web building
Fundamentals of Web building
 
Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)Apache Drill (ver. 0.2)
Apache Drill (ver. 0.2)
 

More from Prabhat gangwar

Middleware
MiddlewareMiddleware
Middleware
Prabhat gangwar
 
Pseudolocalization
PseudolocalizationPseudolocalization
Pseudolocalization
Prabhat gangwar
 
Mule anypoint studio
Mule anypoint studioMule anypoint studio
Mule anypoint studio
Prabhat gangwar
 
Mule anypoint platform
Mule anypoint platformMule anypoint platform
Mule anypoint platform
Prabhat gangwar
 
What is cluster analysis
What is cluster analysisWhat is cluster analysis
What is cluster analysis
Prabhat gangwar
 
Restful api modeling language
Restful api modeling languageRestful api modeling language
Restful api modeling language
Prabhat gangwar
 
Mule esb
Mule esbMule esb
Mule esb
Prabhat gangwar
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
Prabhat gangwar
 
Gsm architecture
Gsm architectureGsm architecture
Gsm architecture
Prabhat gangwar
 
Oracle vs-mulesoft-api-manager-features
Oracle vs-mulesoft-api-manager-featuresOracle vs-mulesoft-api-manager-features
Oracle vs-mulesoft-api-manager-features
Prabhat gangwar
 
File transfer methods
File transfer methodsFile transfer methods
File transfer methods
Prabhat gangwar
 
Ftp tftp
Ftp tftpFtp tftp
Ftp tftp
Prabhat gangwar
 
Bpm
BpmBpm
Global warming
Global warmingGlobal warming
Global warming
Prabhat gangwar
 
Seo
SeoSeo
Vedic mathmetics
Vedic mathmeticsVedic mathmetics
Vedic mathmetics
Prabhat gangwar
 
Trends
TrendsTrends
Buissness model analysis
Buissness model analysisBuissness model analysis
Buissness model analysis
Prabhat gangwar
 
E commerce buissness-model
E commerce buissness-modelE commerce buissness-model
E commerce buissness-model
Prabhat gangwar
 
Office politics
Office politicsOffice politics
Office politics
Prabhat gangwar
 

More from Prabhat gangwar (20)

Middleware
MiddlewareMiddleware
Middleware
 
Pseudolocalization
PseudolocalizationPseudolocalization
Pseudolocalization
 
Mule anypoint studio
Mule anypoint studioMule anypoint studio
Mule anypoint studio
 
Mule anypoint platform
Mule anypoint platformMule anypoint platform
Mule anypoint platform
 
What is cluster analysis
What is cluster analysisWhat is cluster analysis
What is cluster analysis
 
Restful api modeling language
Restful api modeling languageRestful api modeling language
Restful api modeling language
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule fundamentals
Mule fundamentalsMule fundamentals
Mule fundamentals
 
Gsm architecture
Gsm architectureGsm architecture
Gsm architecture
 
Oracle vs-mulesoft-api-manager-features
Oracle vs-mulesoft-api-manager-featuresOracle vs-mulesoft-api-manager-features
Oracle vs-mulesoft-api-manager-features
 
File transfer methods
File transfer methodsFile transfer methods
File transfer methods
 
Ftp tftp
Ftp tftpFtp tftp
Ftp tftp
 
Bpm
BpmBpm
Bpm
 
Global warming
Global warmingGlobal warming
Global warming
 
Seo
SeoSeo
Seo
 
Vedic mathmetics
Vedic mathmeticsVedic mathmetics
Vedic mathmetics
 
Trends
TrendsTrends
Trends
 
Buissness model analysis
Buissness model analysisBuissness model analysis
Buissness model analysis
 
E commerce buissness-model
E commerce buissness-modelE commerce buissness-model
E commerce buissness-model
 
Office politics
Office politicsOffice politics
Office politics
 

Recently uploaded

AI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdfAI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdf
SrimanigandanMadurai
 
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ..."DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
thanhluan21
 
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdfThe Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
JackieSparrow3
 
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
PECB
 
Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?
Rakesh Jalan
 
Chapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptx
Chapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptxChapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptx
Chapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptx
Brajeswar Paul
 
The membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERPThe membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERP
Celine George
 
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and RemediesArdra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Astro Pathshala
 
How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17
Celine George
 
Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...
Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...
Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...
Neny Isharyanti
 
Webinar Innovative assessments for SOcial Emotional Skills
Webinar Innovative assessments for SOcial Emotional SkillsWebinar Innovative assessments for SOcial Emotional Skills
Webinar Innovative assessments for SOcial Emotional Skills
EduSkills OECD
 
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptxUnlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
bipin95
 
Principles of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptxPrinciples of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptx
ibtesaam huma
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
Nguyen Thanh Tu Collection
 
Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...
Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...
Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...
Murugan Solaiyappan
 
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUMENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
HappieMontevirgenCas
 
The basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptxThe basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptx
heathfieldcps1
 
Bedok NEWater Photostory - COM322 Assessment (Story 2)
Bedok NEWater Photostory - COM322 Assessment (Story 2)Bedok NEWater Photostory - COM322 Assessment (Story 2)
Bedok NEWater Photostory - COM322 Assessment (Story 2)
Liyana Rozaini
 
SYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISING
SYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISINGSYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISING
SYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISING
Dr Vijay Vishwakarma
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

AI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdfAI_in_HR_Presentation Part 1 2024 0703.pdf
AI_in_HR_Presentation Part 1 2024 0703.pdf
 
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ..."DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
"DANH SÁCH THÍ SINH XÉT TUYỂN SỚM ĐỦ ĐIỀU KIỆN TRÚNG TUYỂN ĐẠI HỌC CHÍNH QUY ...
 
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdfThe Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
The Jewish Trinity : Sabbath,Shekinah and Sanctuary 4.pdf
 
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
AI Risk Management: ISO/IEC 42001, the EU AI Act, and ISO/IEC 23894
 
Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?Is Email Marketing Really Effective In 2024?
Is Email Marketing Really Effective In 2024?
 
Chapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptx
Chapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptxChapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptx
Chapter-2-Era-of-One-party-Dominance-Class-12-Political-Science-Notes-2 (1).pptx
 
The membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERPThe membership Module in the Odoo 17 ERP
The membership Module in the Odoo 17 ERP
 
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and RemediesArdra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
Ardra Nakshatra (आर्द्रा): Understanding its Effects and Remedies
 
How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17How to Create Sequence Numbers in Odoo 17
How to Create Sequence Numbers in Odoo 17
 
Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...
Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...
Understanding and Interpreting Teachers’ TPACK for Teaching Multimodalities i...
 
Webinar Innovative assessments for SOcial Emotional Skills
Webinar Innovative assessments for SOcial Emotional SkillsWebinar Innovative assessments for SOcial Emotional Skills
Webinar Innovative assessments for SOcial Emotional Skills
 
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptxUnlocking Educational Synergy-DIKSHA & Google Classroom.pptx
Unlocking Educational Synergy-DIKSHA & Google Classroom.pptx
 
Principles of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptxPrinciples of Roods Approach!!!!!!!.pptx
Principles of Roods Approach!!!!!!!.pptx
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 12 - GLOBAL SUCCESS - FORM MỚI 2025 - HK1 (C...
 
Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...
Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...
Lecture_Notes_Unit4_Chapter_8_9_10_RDBMS for the students affiliated by alaga...
 
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUMENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
ENGLISH-7-CURRICULUM MAP- MATATAG CURRICULUM
 
The basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptxThe basics of sentences session 9pptx.pptx
The basics of sentences session 9pptx.pptx
 
Bedok NEWater Photostory - COM322 Assessment (Story 2)
Bedok NEWater Photostory - COM322 Assessment (Story 2)Bedok NEWater Photostory - COM322 Assessment (Story 2)
Bedok NEWater Photostory - COM322 Assessment (Story 2)
 
SYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISING
SYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISINGSYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISING
SYBCOM SEM III UNIT 1 INTRODUCTION TO ADVERTISING
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
 

Web servicesoverview

  • 1. Web Services OverviewWeb Services Overview Prabhat GangwarPrabhat Gangwar Software DevloperSoftware Devloper Genx Info TechnologiesGenx Info Technologies
  • 2. AssignmentsAssignments  Download and install Tomcat (again).Download and install Tomcat (again). • http://jakarta.apache.org/tomcat/http://jakarta.apache.org/tomcat/ • You will need two tomcat servers.You will need two tomcat servers.  Install Apache Axis.Install Apache Axis. • Use “HappyAxis” to make sure you have done soUse “HappyAxis” to make sure you have done so correctly.correctly. • http://ws.apache.org/axis/http://ws.apache.org/axis/  Design and deploy a sample web service.Design and deploy a sample web service.  Write a client application to use the web service.Write a client application to use the web service.  Use Google and Amazon WSDL to design yourUse Google and Amazon WSDL to design your own client.own client.
  • 3. This Lecture…This Lecture…  This lecture is intended toThis lecture is intended to introduceintroduce the main concepts of Web Services.the main concepts of Web Services.  We will also look at some thingsWe will also look at some things ((SOAP, WSDLSOAP, WSDL) in detail…) in detail…  But the primary purpose is toBut the primary purpose is to introduce topics that will all beintroduce topics that will all be covered incovered in greater detailgreater detail in futurein future lectures.lectures.
  • 4. What Are Web Services?What Are Web Services?  Web services framework is an XML-based distributedWeb services framework is an XML-based distributed object/service/component system.object/service/component system. • SOAP, WSDLSOAP, WSDL, WSIL, UDDI, WSIL, UDDI • Intended to supportIntended to support machine-to-machinemachine-to-machine interactions over theinteractions over the network.network.  Basic ideas is to build anBasic ideas is to build an platform and programmingplatform and programming language-independentlanguage-independent distributed invocation system out ofdistributed invocation system out of existingexisting Web standardsWeb standards.. • Most standards defined by W3C, Oasis (IP considerations)Most standards defined by W3C, Oasis (IP considerations) • Interoperability really works, as long as you can map XMLInteroperability really works, as long as you can map XML message to a programming language type, structure, class,message to a programming language type, structure, class, etc.etc.  Very loosely defined, when compared toVery loosely defined, when compared to CORBACORBA, etc., etc.  Inherit both good and bad of the webInherit both good and bad of the web • Scalable, simple, distributedScalable, simple, distributed • But no centralized management, system is inefficient, must beBut no centralized management, system is inefficient, must be tolerant of failures.tolerant of failures.
  • 5. Basic Architectures:Basic Architectures: Servlets/CGI and Web ServicesServlets/CGI and Web Services Browser Web Server HTTP GET/POST DB JDBC Web Server DB JDBC Browser Web Server SOAP GUI Client SOAP WSDL WSDL WSDL WSDL
  • 6. Explanation of Previous SlideExplanation of Previous Slide  The diagram on the left represents a standardThe diagram on the left represents a standard web application.web application. • Browsers converse with web servers using HTTPBrowsers converse with web servers using HTTP GET/POST methods.GET/POST methods. • Servlets or CGI scripts process the parameters and takeServlets or CGI scripts process the parameters and take action, like connect to a DB.action, like connect to a DB. • Examples:Examples: Google, AmazonGoogle, Amazon  On the right, we have a Web services system.On the right, we have a Web services system. • Interactions may be either through the browser orInteractions may be either through the browser or through a desktop client (Java Swing, Python, Windows,through a desktop client (Java Swing, Python, Windows, etc.)etc.) • I will explain how to do this in several more lectures.I will explain how to do this in several more lectures. • Examples:Examples: Google, AmazonGoogle, Amazon
  • 7. Some TerminologySome Terminology  The diagram on the left is called aThe diagram on the left is called a client/serverclient/server system.system.  The diagram on the right is called aThe diagram on the right is called a multi-tieredmulti-tiered architecture.architecture.  SOAPSOAP: Simple Object Access Protocol: Simple Object Access Protocol • XML Message format between client and service.XML Message format between client and service.  WSDLWSDL: Web Service Description Language.: Web Service Description Language. • Describes how the service is to be usedDescribes how the service is to be used • Compare (for example) to Java Interface.Compare (for example) to Java Interface. • Guideline for constructing SOAP messages.Guideline for constructing SOAP messages. • WSDL is an XML language for writingWSDL is an XML language for writing ApplicationApplication Programmer InterfacesProgrammer Interfaces (APIs).(APIs).
  • 8. Amazon and Google ExperimentAmazon and Google Experiment with Web Serviceswith Web Services  Both Google and Amazon have conductedBoth Google and Amazon have conducted open experiments with Web services.open experiments with Web services.  Why? To allow partners to develop customWhy? To allow partners to develop custom user interfaces and applications that workuser interfaces and applications that work Google and Amazon data and services.Google and Amazon data and services.  You can download their APIs and try them.You can download their APIs and try them. • http://www.google.com/apis/http://www.google.com/apis/ • http://www.amazon.com/webserviceshttp://www.amazon.com/webservices
  • 9. Why Use Web Services?Why Use Web Services?  Web services provide a cleanWeb services provide a clean separationseparation between a capability and its user interface.between a capability and its user interface.  This allows a company (Google) with aThis allows a company (Google) with a sophisticated capability and huge amountssophisticated capability and huge amounts of data to make that capability available toof data to make that capability available to its partners.its partners. • ““Don’t worry about howDon’t worry about how PageRankPageRank works orworks or web robots or data storage. We will do that.web robots or data storage. We will do that. You just use this WSDL API to build your clientYou just use this WSDL API to build your client application to use our search engine.”application to use our search engine.”
  • 10. A Google AsideA Google Aside  Google’sGoogle’s PageRankPageRank system was developedsystem was developed by two Stanford grad students.by two Stanford grad students.  OpenOpen algorithm published in scholarlyalgorithm published in scholarly journals, conferences.journals, conferences. • Previous (and lousy) search engines were allPrevious (and lousy) search engines were all proprietary.proprietary.  See for exampleSee for example http://www7.scu.edu.au/programme/fullpaperhttp://www7.scu.edu.au/programme/fullpaper
  • 11. When To Use Web Services?When To Use Web Services?  Applications do not have severe restrictions onApplications do not have severe restrictions on reliability and speedreliability and speed..  Two or more organizations need toTwo or more organizations need to cooperatecooperate • One needs to write an application that uses another’sOne needs to write an application that uses another’s service.service.  Services can beServices can be upgraded independentlyupgraded independently ofof clients.clients. • Google can improve PageRank implemenation withoutGoogle can improve PageRank implemenation without telling me.telling me. • Just don’t change the WSDL.Just don’t change the WSDL.  Services can be easily expressed with simpleServices can be easily expressed with simple request/responserequest/response semantics and simplesemantics and simple statestate.. • HTTP and Cookies, for example.HTTP and Cookies, for example.
  • 12. Relationship to PreviousRelationship to Previous WorkWork Connecting to Bryan’sConnecting to Bryan’s Lectures on XML, Java, JavaLectures on XML, Java, Java Servlets and JSP.Servlets and JSP.
  • 13. XML OverviewXML Overview  XML is a language for building languages.XML is a language for building languages.  Basic rules: be well formed and be validBasic rules: be well formed and be valid  Particular XML “dialects” are defined by anParticular XML “dialects” are defined by an XML Schema.XML Schema. • XML itself is defined by its own schema.XML itself is defined by its own schema.  XML is extensible via namespacesXML is extensible via namespaces  Many non-Web services dialectsMany non-Web services dialects • RDF, SVG,GML, XForms, XHTMLRDF, SVG,GML, XForms, XHTML  Many basic tools available: parsers, XPathMany basic tools available: parsers, XPath and XQuery for searching/querying, etc.and XQuery for searching/querying, etc.
  • 14. XML and Web servicesXML and Web services  XML provides a natural substrate for distributedXML provides a natural substrate for distributed computing:computing: • Its just a data description.Its just a data description. • Platform, programming language independent.Platform, programming language independent.  So let’s describe the pieces.So let’s describe the pieces.  Web Services Description Language (WSDL)Web Services Description Language (WSDL) • Describes how to invoke a service (compare with CORBADescribes how to invoke a service (compare with CORBA IDL).IDL). • Can bind to SOAP, other protocols for actual invocation.Can bind to SOAP, other protocols for actual invocation.  Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP) • Wire protocol extension for conveying RPC calls.Wire protocol extension for conveying RPC calls. • Can be carried over HTTP, SMTP.Can be carried over HTTP, SMTP.
  • 15. Web Service ArchitecturesWeb Service Architectures  The following examples illustrate how WebThe following examples illustrate how Web services interact with clients.services interact with clients.  For us, a client is typically a JSP, servlet,For us, a client is typically a JSP, servlet, or portlet that a user accesses throughor portlet that a user accesses through browser.browser.  You can also build other clientsYou can also build other clients • Web serviceWeb service interoperabilityinteroperability means that clientsmeans that clients and services can be in different programmingand services can be in different programming languages (C/C++, python, java, etc).languages (C/C++, python, java, etc).
  • 16. Browser Interface User Interface Server + Client Stubs Server plus Service Implementations Backend Resources HTTP(S) SOAP/HTTP(S) Local invocation, JDBC connection or Grid Protocol UI Server has stubs for all services (data base access, job submission, file transfer, etc.) A particular server has several service implementations. Backend is a database, application code plus operating system.
  • 17. User Interface Server DB Service 1 JDBC DB Job Sub/Mon And File Services Operating and Queuing Systems User Interface DB Service 2 JDBC DB Host 1 Host 2 Host 3
  • 18. Before Going On…Before Going On…  In the next several slides we’ll go into theIn the next several slides we’ll go into the details of WSDL and SOAP.details of WSDL and SOAP.  But in practice,But in practice, you don’t need to workyou don’t need to work directly with eitherdirectly with either.. • Most tools that I’m familiar with generate theMost tools that I’m familiar with generate the WSDL for you from your class.WSDL for you from your class. • SOAP messages are constructed by classes.SOAP messages are constructed by classes. • GeneratedGenerated client stubsclient stubs will even hide SOAPwill even hide SOAP classes behind a local “façade” that looks like aclasses behind a local “façade” that looks like a local class but actually constructs SOAP calls tolocal class but actually constructs SOAP calls to the remote server.the remote server.
  • 19. Web ServicesWeb Services Description LanguageDescription Language Defines what your serviceDefines what your service does and how it is invoked.does and how it is invoked.
  • 20. WSDL OverviewWSDL Overview  WSDL is an XML-based Interface DefinitionWSDL is an XML-based Interface Definition Language.Language. • You can define the APIs for all of your services in WSDL.You can define the APIs for all of your services in WSDL.  WSDL docs are broken into five major parts:WSDL docs are broken into five major parts: • Data definitionsData definitions (in XML) for custom types(in XML) for custom types • Abstract message definitionsAbstract message definitions (request, response)(request, response) • Organization of messages into “Organization of messages into “portsports” and “” and “operationsoperations”” ((classes and methods).classes and methods). • Protocol bindingsProtocol bindings (to SOAP, for example)(to SOAP, for example) • Service point locationsService point locations (URLs)(URLs)  Some interesting featuresSome interesting features • A single WSDL document can describe several versionsA single WSDL document can describe several versions of an interface.of an interface. • A single WSDL doc can describe several related services.A single WSDL doc can describe several related services.
  • 21. The Java CodeThe Java Code public String[] execLocalCommand(Stringpublic String[] execLocalCommand(String command) {command) { Runtime rt = Runtime.getRuntime();Runtime rt = Runtime.getRuntime(); String stdout="",stderr="";String stdout="",stderr=""; try {try { Process p = rt.exec(command);Process p = rt.exec(command); BufferedReader in=BufferedReader in= new BufferedReader(newnew BufferedReader(new InputStreamReader(p.getInputStream()));InputStreamReader(p.getInputStream())); BufferedReader err=BufferedReader err= new BufferedReader(newnew BufferedReader(new InputStreamReader(p.getErrorStream()));InputStreamReader(p.getErrorStream()));
  • 22. Java Code ContinuedJava Code Continued String line;String line; while((line=in.readLine())!= null)while((line=in.readLine())!= null) {stdout+=line+"n";}{stdout+=line+"n";} in.close();in.close(); while ((line=err.readLine())!=null)while ((line=err.readLine())!=null) {stderr+=line+"n";}{stderr+=line+"n";} err.close();err.close(); }//End of try{}}//End of try{} catch (Exception eio) {…}catch (Exception eio) {…} String[] retstring=new String[2];String[] retstring=new String[2]; retstring[0]=stdout;retstring[0]=stdout; retstring[1]=stderr;retstring[1]=stderr; return retstring;return retstring; } //End of method} //End of method
  • 23. WSDL Example: JobWSDL Example: Job SubmissionSubmission  Our example is a simple service that canOur example is a simple service that can executes local (to the server) commands.executes local (to the server) commands.  Service implementation (in Java) has aService implementation (in Java) has a single methodsingle method • ExecLocal takes a single string argument (theExecLocal takes a single string argument (the command to exec)command to exec) • Returns a 2D string array (standard out andReturns a 2D string array (standard out and error).error).  The WSDL maps to a Java interface in thisThe WSDL maps to a Java interface in this case.case.
  • 24. The Full WSDLThe Full WSDL  The following slide contains the WSDLThe following slide contains the WSDL definition for the Job Submit service.definition for the Job Submit service. • I omitted some data definitions to get into oneI omitted some data definitions to get into one page with a decent font.page with a decent font.  As you can see, WSDL is veryAs you can see, WSDL is very verboseverbose • Typically, you don’t write WSDLTypically, you don’t write WSDL • This file was actually generated from my JavaThis file was actually generated from my Java class byclass by Apache AxisApache Axis..  We will go through the parts of the doc inWe will go through the parts of the doc in some detail.some detail.
  • 25. <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions> <wsdl:message name="execLocalCommandResponse"> <wsdl:message name="execLocalCommandRequest"> <wsdl:portType name="SJwsImp"> <wsdl:operation name="execLocalCommand" parameterOrder="in0"> <wsdl:input message="impl:execLocalCommandRequest" name="execLocalCommandRequest"/> <wsdl:output message="impl:execLocalCommandResponse" name="execLocalCommandResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="SubmitjobSoapBinding" type="impl:SJwsImp"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="execLocalCommand"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="execLocalCommandRequest"> <wsdl:output name="execLocalCommandResponse"> </wsdl:operation> </wsdl:binding> <wsdl:service name="SJwsImpService"> <wsdl:port binding="impl:SubmitjobSoapBinding" name="Submitjob"> </wsdl:service> </wsdl:definitions>
  • 26. WSDL Elements IWSDL Elements I  TypesTypes: describes custom XML data types: describes custom XML data types (optional) used in messages.(optional) used in messages. • For OO languages, types are a limited objectFor OO languages, types are a limited object serialization.serialization. • We’ll see an example for defining arrays.We’ll see an example for defining arrays.  MessageMessage: abstractly defines the messages that: abstractly defines the messages that need to be exchanged.need to be exchanged. • Conventionally messages are used to group requestsConventionally messages are used to group requests and responses.and responses. • Each method/function in the interface contains 0-1Each method/function in the interface contains 0-1 request and 0-1 response messages.request and 0-1 response messages. • Consists ofConsists of partpart elements. Usually you need one part forelements. Usually you need one part for each variable sent or received. Parts can either be XMLeach variable sent or received. Parts can either be XML primitive types or custom complex types.primitive types or custom complex types.
  • 27. TypesTypes for Job Submissionfor Job Submission  Recall that the job submissionRecall that the job submission service sends a string (theservice sends a string (the command) and returns a 2D array.command) and returns a 2D array.  StringsStrings are XML Schemaare XML Schema primitiveprimitive typestypes, so we don’t need a special, so we don’t need a special definition in our WSDL.definition in our WSDL.  ArraysArrays areare not primitive typesnot primitive types. They. They are defined in the SOAP schema, soare defined in the SOAP schema, so we will import that definition.we will import that definition. • In other words, SOAP has rules for arrayIn other words, SOAP has rules for array encoding; vanilla XML does not.encoding; vanilla XML does not.
  • 28. Example: WSDLExample: WSDL typestypes for Customfor Custom Data DefinitionData Definition <wsdl:types> <schema targetNamespace="http://.../GCWS/services/Submitjob" xmlns:impl="http://.../GCWS/services/Submitjob" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <complexType name="ArrayOf_xsd_string"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]" /> </restriction> </complexContent> </complexType> <element name="ArrayOf_xsd_string" nillable="true" type="impl:ArrayOf_xsd_string" /> </schema> </wsdl:types>
  • 29. What Does It Mean?What Does It Mean?  We start with some usefulWe start with some useful namespace definitions.namespace definitions.  We next import the SOAP schemaWe next import the SOAP schema • It has the array definitions we need.It has the array definitions we need.  Finally, we define our own local XMLFinally, we define our own local XML complex type, ArrayOf_xsd_string.complex type, ArrayOf_xsd_string. • This extends the SOAP array typeThis extends the SOAP array type • We restrict this to String arrays.We restrict this to String arrays.
  • 30. MessageMessage Elements for JobElements for Job Submission ServiceSubmission Service  Our service implementation has one method ofOur service implementation has one method of the form (in Java)the form (in Java) public String[] execLocalCommand(String cmd)public String[] execLocalCommand(String cmd)  This will require one “request” message and oneThis will require one “request” message and one “response” message.“response” message.  Each message has oneEach message has one part:part: • Request message must send the String cmd.Request message must send the String cmd. • Response must get back the String[] array (definedResponse must get back the String[] array (defined previously as a custom type).previously as a custom type).  If we had to pass two input variables, ourIf we had to pass two input variables, our “request” message would need two part“request” message would need two part elements.elements.  Note the name attributes of messages areNote the name attributes of messages are important!important!
  • 31. Message Examples for JobMessage Examples for Job Submission ServiceSubmission Service <wsdl:message name="execLocalCommandResponse"> <wsdl:part name="execLocalCommandReturn" type="impl:ArrayOf_xsd_string" /> </wsdl:message> <wsdl:message name="execLocalCommandRequest"> <wsdl:part name="in0" type="xsd:string" /> </wsdl:message>
  • 32. portTypesportTypes  portTypeportType elements map messages toelements map messages to operationsoperations..  You can think of portType==class,You can think of portType==class, operation==class methods.operation==class methods.  Operations can contain input, output,Operations can contain input, output, and/or fault bindings for messages.and/or fault bindings for messages.  An operation may support of the followingAn operation may support of the following message styles:message styles: • One-way: request onlyOne-way: request only • Two-way: request/responseTwo-way: request/response • Solicit-response: server “push” and client responseSolicit-response: server “push” and client response • Notification: one-way server pushNotification: one-way server push
  • 33. portType for JobSubmitportType for JobSubmit  We previously defined the messagesWe previously defined the messages and types needed. Now we bindand types needed. Now we bind them into the portType structure.them into the portType structure.  PortType names are importantPortType names are important • Will be referenced byWill be referenced by bindingbinding element.element.  Note names of previously definedNote names of previously defined messages are used as references inmessages are used as references in the operations.the operations.
  • 34. <wsdl:portType name="SJwsImp"> <wsdl:operation name="execLocalCommand" parameterOrder="in0"> <wsdl:input message="impl:execLocalCommandRequest" name="execLocalCommandRequest" /> <wsdl:output message="impl:execLocalCommandResponse" name="execLocalCommandResponse" /> </wsdl:operation> </wsdl:portType> Example WSDL NuggetExample WSDL Nugget
  • 35. Some Notes on the PortTypeSome Notes on the PortType DefinitionDefinition  PortTypes refer to messages by namePortTypes refer to messages by name • The message attribute in <input> andThe message attribute in <input> and <output> elements of <operation> refer to<output> elements of <operation> refer to the name attributes of the previously definedthe name attributes of the previously defined messages.messages. • The operation and portType names willThe operation and portType names will similarly be used for reference in forthcomingsimilarly be used for reference in forthcoming tags.tags.  Also note “parameterOrder” does what youAlso note “parameterOrder” does what you would expect. For the current example,would expect. For the current example, there is only one input parameter.there is only one input parameter.
  • 36. PortType BindingsPortType Bindings  portTypes are abstract interfaceportTypes are abstract interface definitions.definitions. • Don’t say anything about how to invoke aDon’t say anything about how to invoke a remote method.remote method.  Remote invocations are defined inRemote invocations are defined in bindingbinding elements.elements.  Binding elements are really just placeBinding elements are really just place holders that are extended for specificholders that are extended for specific protocolsprotocols • WSDL spec provides SOAP, HTTP GET/POST,WSDL spec provides SOAP, HTTP GET/POST, and MIME extension schema examples.and MIME extension schema examples.
  • 37. SOAP Bindings for JobSubmitSOAP Bindings for JobSubmit ServiceService  Note that the binding element contains a mixtureNote that the binding element contains a mixture of tags from different namespaces (wsdl andof tags from different namespaces (wsdl and wsdlsoap).wsdlsoap).  WSDL child elements forWSDL child elements for bindingbinding element areelement are operation, input,operation, input, andand output.output.  WSDLSOAP elements are from a different XMLWSDLSOAP elements are from a different XML schema (a new one, neither WSDL nor SOAP).schema (a new one, neither WSDL nor SOAP). • This is how you extend WSDL bindings: define a newThis is how you extend WSDL bindings: define a new schema that gives mapping instructions from WSDL toschema that gives mapping instructions from WSDL to the protocol of choice.the protocol of choice.  The binding element name is important, will beThe binding element name is important, will be used as a reference by the final port binding.used as a reference by the final port binding.
  • 38. <wsdl:binding name="SubmitjobSoapBinding" type="impl:SJwsImp"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="execLocalCommand"> <wsdlsoap:operation soapAction="" /> <wsdl:input name="execLocalCommandRequest"> <wsdlsoap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ namespace="http://.../GCWS/services/Submitjob" use="encoded" /> </wsdl:input> <wsdl:output name="execLocalCommandResponse"> <wsdlsoap:body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ namespace=http://.../GCWS/services/Submitjob use="encoded" /> </wsdl:output> </wsdl:operation> </wsdl:binding>
  • 39. A Closer Look at SOAP BindingA Closer Look at SOAP Binding <wsdlsoap:body<wsdlsoap:body encodingStyle=encodingStyle=http://schemas.xmlsoap.org/http://schemas.xmlsoap.org/ soap/encoding/soap/encoding/ namespace=namespace=http://.../GCWS/services/Submihttp://.../GCWS/services/Submi tjobtjob use="use="encodedencoded" />" />  All this really means is “encode the message byAll this really means is “encode the message by the rules in encodingStyle and put it in the SOAPthe rules in encodingStyle and put it in the SOAP body.”body.”  The bindings are just instructions that must beThe bindings are just instructions that must be implemented by the SOAP message generator.implemented by the SOAP message generator.
  • 40. Service and Port DefinitionsService and Port Definitions  So far, we have defined the classSo far, we have defined the class method interfaces (portTypes) andmethod interfaces (portTypes) and the rules for binding to a particularthe rules for binding to a particular protocol.protocol.  PortPort elements define how theelements define how the bindings (and thus the portTypes)bindings (and thus the portTypes) are associated with a particularare associated with a particular server.server.  TheThe serviceservice element collectselement collects ports.ports.
  • 42. ExplanationExplanation  Note the port element’s binding attributeNote the port element’s binding attribute points to the appropriatepoints to the appropriate bindingbinding elementelement by name.by name.  The only purpose of the port element is toThe only purpose of the port element is to point to a service location (a URL). This ispoint to a service location (a URL). This is done by extension (SOAP in this case.)done by extension (SOAP in this case.)  Ports are child elements of thePorts are child elements of the serviceservice element. A service can contain one orelement. A service can contain one or more ports.more ports. • Note the value of multiple ports: a singleNote the value of multiple ports: a single portType may correspond to several ports,portType may correspond to several ports, each with a different protocol binding andeach with a different protocol binding and service point.service point.
  • 43. WSDL TriviaWSDL Trivia  The schema rules allow all of the elements weThe schema rules allow all of the elements we have discussed to appear zero or more times.have discussed to appear zero or more times.  A single WSDL file may contain many portTypesA single WSDL file may contain many portTypes (although this is not usual).(although this is not usual). • You may want to do this to support multiple interfaceYou may want to do this to support multiple interface definitions of a service for backward compatibility.definitions of a service for backward compatibility.  Multiple ports may also be used to provideMultiple ports may also be used to provide different views of a servicedifferent views of a service • One portType defines the interface.One portType defines the interface. • Another provides access to metadata about the service.Another provides access to metadata about the service. • Yet another may define how the service interacts withYet another may define how the service interacts with other servicesother services via notification/event systemsvia notification/event systems..
  • 44. Simple Object AccessSimple Object Access ProtocolProtocol A message format forA message format for exchanging structured, typedexchanging structured, typed informationinformation
  • 45. SOAP BasicsSOAP Basics  SOAP is often thought of as a protocol extensionSOAP is often thought of as a protocol extension for doing RPC over HTTP.for doing RPC over HTTP.  This is not completely accurate: SOAP is an XMLThis is not completely accurate: SOAP is an XML message format for exchanging structured, typedmessage format for exchanging structured, typed data.data.  It may be used for RPC in client-serverIt may be used for RPC in client-server applications but is also suitable for messagingapplications but is also suitable for messaging systems (like JMS) that follow one-to-many (orsystems (like JMS) that follow one-to-many (or publish-subscribe) models.publish-subscribe) models.  SOAP is not a transport protocol. You mustSOAP is not a transport protocol. You must attach your message to a transport mechanismattach your message to a transport mechanism like HTTP.like HTTP.
  • 46. SOAP StructureSOAP Structure  A SOAP message is contained in anA SOAP message is contained in an envelop.envelop.  The envelop element in turn containThe envelop element in turn contain (in order)(in order) • An optionalAn optional headerheader with one or morewith one or more child entrieschild entries.. • AA bodybody element that can contain one orelement that can contain one or more child entries. These child entriesmore child entries. These child entries may contain arbitrary XML data.may contain arbitrary XML data.
  • 47. SOAP HeadersSOAP Headers  Headers are really just extension pointsHeaders are really just extension points where you can include elements fromwhere you can include elements from other namespaces.other namespaces. • i.e., headers can contain arbitrary XML.i.e., headers can contain arbitrary XML.  Header entries may optionally have aHeader entries may optionally have a “mustUnderstand” attribute.“mustUnderstand” attribute. • mustUnderstand=1 means the messagemustUnderstand=1 means the message recipient must process the header element.recipient must process the header element. • If mustUnderstand=0 or is missing, the headerIf mustUnderstand=0 or is missing, the header element is optional.element is optional.
  • 48. SOAP BodySOAP Body  Body entries are really just placeholdersBody entries are really just placeholders for arbitrary XML from some otherfor arbitrary XML from some other namespace.namespace.  The body contains the XML message thatThe body contains the XML message that you are transmitting.you are transmitting.  The message format is not specified byThe message format is not specified by SOAP.SOAP. • The <Body></Body> tag pairs are just a wayThe <Body></Body> tag pairs are just a way to notify the recipient that the actual XMLto notify the recipient that the actual XML message is contained therein.message is contained therein. • The recipient decides what to do with theThe recipient decides what to do with the message.message.
  • 49. Example MessagesExample Messages  Recall the WSDL interface for “SubmitJob”Recall the WSDL interface for “SubmitJob” • Sends one string commandSends one string command • Returns array of strings for standard out and error.Returns array of strings for standard out and error.  The envelop is decorated with a few usefulThe envelop is decorated with a few useful namespacesnamespaces:: • soapenv defines the versionsoapenv defines the version • xsd is the Schema definition itselfxsd is the Schema definition itself • xsi defines some useful constants.xsi defines some useful constants.  The body is just an arbitrary XMLThe body is just an arbitrary XML fragment.fragment. • Assumes the recipient knows what this means.Assumes the recipient knows what this means. • Recipient must looks up the ExecLocalCommand operation inRecipient must looks up the ExecLocalCommand operation in the JobSubmit service and passes it one string argument.the JobSubmit service and passes it one string argument. • The ns1 namespace tells the recipient the WSDL namespaceThe ns1 namespace tells the recipient the WSDL namespace that defines the service.that defines the service. • xsi:type lets the recipient know that the arbitrary XML elementxsi:type lets the recipient know that the arbitrary XML element in0 is in fact a string, as defined by the XML Schema.in0 is in fact a string, as defined by the XML Schema.
  • 51. Example ResponseExample Response  The structure is the same as the request.The structure is the same as the request.  The interesting thing here is that theThe interesting thing here is that the request returns a 2-element array of tworequest returns a 2-element array of two strings.strings. • Arrays not defined by XML schemaArrays not defined by XML schema • SOAP encoding does define arrays, so useSOAP encoding does define arrays, so use xsi:type to point to this definition.xsi:type to point to this definition. • <item></item> surrounds each array<item></item> surrounds each array element.element.  Note that arbitrary XML returns canNote that arbitrary XML returns can likewise be encoded this way.likewise be encoded this way. • Use xsi:type to point to a schema.Use xsi:type to point to a schema.
  • 53. Developing WebDeveloping Web ServicesServices Using Apache Axis to developUsing Apache Axis to develop Java implementations of WebJava implementations of Web services.services.
  • 54. Web Service DevelopmentWeb Service Development ToolsTools  Web service toolkits exist for variousWeb service toolkits exist for various programming languages:programming languages: • C++,Python, Perl, various MicrosoftC++,Python, Perl, various Microsoft .NET kits..NET kits.  We’ll concentrate on building JavaWe’ll concentrate on building Java Web services with Apache Axis.Web services with Apache Axis.  Language and implementationLanguage and implementation interoperability is addressed throughinteroperability is addressed through WS-I.WS-I. • http://www.ws-i.org/http://www.ws-i.org/
  • 55. Apache Axis OverviewApache Axis Overview  Apache Axis is a toolkit for converting JavaApache Axis is a toolkit for converting Java applications into Web services.applications into Web services.  Axis service deployment tools allow you toAxis service deployment tools allow you to publish your service in a particularpublish your service in a particular application server (Tomcat).application server (Tomcat).  Axis client tools allow you to convertAxis client tools allow you to convert WSDL into client stubs.WSDL into client stubs.  Axis runtime tools accept incoming SOAPAxis runtime tools accept incoming SOAP requests and redirect them to therequests and redirect them to the appropriate service.appropriate service.
  • 56. Developing and Deploying aDeveloping and Deploying a ServiceService  Download and install Tomcat and Axis.Download and install Tomcat and Axis.  Write a Java implementationWrite a Java implementation • Our SubmitJob is a simple example but services can getOur SubmitJob is a simple example but services can get quite complicated.quite complicated. • Compile it into Tomcat’s classpath.Compile it into Tomcat’s classpath.  Write a deployment descriptor (WSDD) for yourWrite a deployment descriptor (WSDD) for your service.service. • Will be used by Axis runtime to direct SOAP calls.Will be used by Axis runtime to direct SOAP calls.  Use Axis’s AdminClient tool to install your WSDDUse Axis’s AdminClient tool to install your WSDD file.file. • The tells the axis servlet to load your class and directThe tells the axis servlet to load your class and direct SOAP requests to it.SOAP requests to it.  That’s it.That’s it. • Axis will automatically generate the WSDL for yourAxis will automatically generate the WSDL for your service.service.
  • 57. <deployment name="Submitjob" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <service name="Submitjob" provider="java:RPC"> <parameter name="scope" value="request"/> <parameter name="className" value="WebFlowSoap.SJwsImp"/> <parameter name="allowedMethods" value="execLocalCommand"/> </service> </deployment> Sample WSDDSample WSDD
  • 58. ExplanationExplanation  Use Axis’s command-lineUse Axis’s command-line AdminClient tool to deploy this to theAdminClient tool to deploy this to the server.server.  Axis will create a service calledAxis will create a service called • http://your.server/services/SubmitJobhttp://your.server/services/SubmitJob  WSDL for service is available fromWSDL for service is available from • http://your.server/services/SubmitJob?http://your.server/services/SubmitJob? wsdlwsdl  A list of all services is available fromA list of all services is available from • http://your.server/serviceshttp://your.server/services
  • 59. Check your Tomcat Server for a list of deployed services.
  • 60. WSDL generated by inspecting the Java implementation. Can be download from the server. (XML was shown in earlier slides)
  • 61. Building a Client with AxisBuilding a Client with Axis  Obtain the WSDL file.Obtain the WSDL file.  Generate client stubsGenerate client stubs • Stubs look like local objects but reallyStubs look like local objects but really convert method invocations into SOAPconvert method invocations into SOAP calls.calls.  Write a client application with theWrite a client application with the stubsstubs • Can be a Java GUI, a JSP page, etc.Can be a Java GUI, a JSP page, etc.  Compile everything and run.Compile everything and run.
  • 62. Sample Java Client CodeSample Java Client Code /**Create SubmitJob client object and point to the/**Create SubmitJob client object and point to the service you want to use */service you want to use */ SubmiJob sjws = newSubmiJob sjws = new SubmitJobServiceLocator().getSubmitjob(newSubmitJobServiceLocator().getSubmitjob(new URL(http://your.server/services/SubmitJob));URL(http://your.server/services/SubmitJob)); /** Invoke the method as if local. *//** Invoke the method as if local. */ String[] messages =String[] messages = sjws.execLocalCommand(command);sjws.execLocalCommand(command);
  • 63. Two Notes On Client StubsTwo Notes On Client Stubs  Axis stubs convert method calls intoAxis stubs convert method calls into SOAP requests but WSDL does notSOAP requests but WSDL does not require the use of SOAP.require the use of SOAP. • Web Service Invocation Framework (WSIF)Web Service Invocation Framework (WSIF) from IBM allows flexibility of protocols. (Alekfrom IBM allows flexibility of protocols. (Alek Slominski, IU)Slominski, IU)  Client stubs introduce versioningClient stubs introduce versioning problemsproblems.. • We are developing dynamic (stubless) clientsWe are developing dynamic (stubless) clients that construct SOAP messages by inspectingthat construct SOAP messages by inspecting WSDL at runtime.WSDL at runtime.
  • 64. Web Service URLsWeb Service URLs  JavaJava • http://xml.apache.org/axis/http://xml.apache.org/axis/  XSOAP: C++ and Java toolkits for WSXSOAP: C++ and Java toolkits for WS • http://www.extreme.indiana.edu/xgws/xsoap/http://www.extreme.indiana.edu/xgws/xsoap/  gSOAP: C++ SOAP toolkitgSOAP: C++ SOAP toolkit • http://www.cs.fsu.edu/~engelen/soap.htmlhttp://www.cs.fsu.edu/~engelen/soap.html  Python Web Services:Python Web Services: • http://pywebsvcs.sourceforge.net/http://pywebsvcs.sourceforge.net/  Perl:Perl: • http://www.soaplite.com/http://www.soaplite.com/