Professional Documents
Culture Documents
J.Amirtharaj Solomon
jamirtha@covansys.com
Technology Group
WEB SERVICES
The Web Services fundamental
Architecture
Core technologies:
SOAP
UDDI
WSDL
Tools and Resources
What are Web
Servi ces?
A Web service represents a unit of
business, application, or system
functionality that can be accessed
over the Web.
Eg.Business Information with
rich content
❚ airline schedules
❚ stock quotes
❚ credit check
Web Servi ces
Eg.
Transactional Web Services for
B2B or B2C
❚ airline reservations
❚ rental car agreements
❚ purchase order
Web Servi ces
Characteristics
❚ It is accessible over the Web.
❚ It provides an interface that can be
called from another program.
❚ It is registered and can be located
through a Web service registry.
❚ It communicates using messages
over standard Web protocols.
Web Se rvi ces
funda mental
Arch ite cture
Web Services
•Response
200 OK
Content-Type: text/plain
Content-Length: 12
Connection: close
SOAP
SOAP Envelope Namespace
for wrapping messages
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:SOAP-
ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
Method Call
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:createOrder xmlns:ns1="urn:ejbsessionbmp" SOAP-
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encodi
ng/">
<orderdetails xmlns:ns2="urn:xml-soap-createorderevent"
xsi:type="ns2:orderdetails">
<quantity xmlns:ns3="http://xml.apache.org/xml-soap"
xsi:type="ns3:Vector">
<item xsi:type="xsd:string">2</item>
<item xsi:type="xsd:string">4</item>
</quantity>
SOAP
<shipToCode xsi:type="xsd:string">1</shipToCode>
<custPartId xmlns:ns4="http://xml.apache.org/xml-soap"
xsi:type="ns4:Vector">
<item xsi:type="xsd:string">FrtLeftA</item>
<item xsi:type="xsd:string">RearLeftA</item>
</custPartId>
<orderType xsi:type="xsd:int">1</orderType>
<orderSeqNo xsi:type="xsd:string">11</orderSeqNo>
<custOrderReference
xsi:type="xsd:string">COR</custOrderReference>
<BCPCode xsi:type="xsd:string">1</BCPCode>
</orderdetails>
</ns1:createOrder>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP hides the service
implementation from requester
Soap Server
Web Server
?????????????????
Standard XML EJB CORBA COBOL
request/response
SOA P and Se cu rit y
A mid-sized
B2B
relationships with
customers, each with Describe
their own set of
standard and Services
protocols
A flower shop in
Smarter Australia wants to be
“plugged in” to every
Discover
Search marketplace in the
world, but doesn’t
Services
know how
A B2B marketplace Integrate
Easier cannot get catalog
data for relevant Them
Aggregation suppliers in its
industry, along with
Together
connections to
shippers, insurers, etc.
UDD I v1
Impl ementati on
UDDI Registry
❚ Programmatic descriptions of web
services
❚ Programming model, schema, and
platform agnostic
❚ Uses XML, HTTP, and SOAP
❚ Free on the Internet
UDDI Registry Entries
Standards Bodies,
Agencies, Programmers,
Publishers register
specifications for their
Service Types
Service providers
register precise
information about
themselves and their
Web services
•Business name
•General business description
•Contact info
Names, phone numbers,
fax numbers, web sites, etc.
•Known identifiers
List of unique identifiers for a business eg.D-
U-N-S, Thomas, domain name, stock ticker
symbol, other
Business categories
•3 base taxonomies in V1
Industry: NAICS (Industry codes - US Govt.)
Product/Services: UNSPSC (ECCMA)
Location: Geographical taxonomy (ISO
3166)
…easy extension in upcoming releases
New set of information businesses use
to describe how to “do e-commerce”
with them
•Nested model
Business process (functional)
Service specifications (technical)
Binding information (implementation)
•Programming/platform/
implementation agnostic
•Services can also be categorized
How UDDI Works
Software companies,
1. standards bodies, and
developers populate the
registry with descriptions Marketplaces, search
(specifications) of types of engines, and business
services 4. applications query the
registry to discover
services at other
2. companies and to
facilitate integration
UDDI Registry
package test;
public class adder{
<portType name="adder_Service">
<operation name="addit">
<input message="InadditRequest"/>
<output message="OutadditResponse"/>
</operation>
</portType>
WSDL
<binding name="adder_ServiceBinding" type="adder_Service">
<soap:binding style="rpc”
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="addit">
<soap:operation soapAction="urn:adder-service"/>
<input>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:adder-service” use="encoded"/>
</input>
<output>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:adder-service" use="encoded"/>
</output>
WSDL
</operation>
</binding>
<service name="adder_Service">
<documentation>IBM WSTK 2.0 generated service definition file
</documentation>
<port binding="adder_ServiceBinding” name="adder_ServicePort” >
<soap:address location="http://localhost:7001/soap/servlet/rpcrouter"/>
</port>
</service>
</definitions>
Our Prototype
Customer Order Creation
Apache Soap Server v 2.2
Weblogic 5.1 sp 9 integrated with
Weblogic 5.1 sp 9
Order No.
HTML EJB
EJB
Servlet
Form
Order details SOAP
DB
Oracle
Application 1 Application 2
Tool s and Resourc es
•http://xml.apache.org/soap/
--> Apache SOAP Server
•http://www.alphaworks.ibm.com/tech
/webservicestoolkit
--> IBM Alphaworks WebServices Toolkit