You are on page 1of 13

The Worlds Leading Provider of eBusiness Applications Software

Web Services

WSDL In a Nutshell

Provides an (XML based) description of a service that can be invoked over the network describes data types of input / output parameters / faults (exceptions) specifies representation of parameters on the wire (SOAP is one possible choice) specifies protocol used for invocation (HTTP, SMTP), and address http://some_url...
a WSDL description of a service enables automated generation of proxies (in many languages) which can invoke the service

Server offers Math service client try { int res = stub.add(4, 5) } catch (RemoteException e) auto-generate stub for client to remotely invoke the add operation network WSDL file describes Math service in XML vendor specific WSDL generation / deployment tool

deploy stub

class Math { int add(int arg1, int arg2) { return arg1 + arg2; } }

A WSDL Example (interface specification only)

our original java code-> class Math { int add(int arg1, int arg2) { return arg1 + arg2; } }

WSDL in the context of the Service Oriented Architecture


Service Oriented Architecture:

AN ARCHITECTURE MADE UP OF COMPONENTS AND INTERCONNECTIONS THAT STRESS:


1) INTEROPERABILITY consumers of the services dont care what language its written in, what platform it runs on 2) LOCATION TRANSPARENCY & LOOSE COUPLING: data types of service parameters can evolve without forcing everyone to upgrade new provider can be discovered dynamically, service can move from machine to machine Registry
returns fully specified WSDL contract that defines service, with service access point for each provider

Find (CreditCardAuthSvc)

Service Consumer, e.g. Amazon.com

register CreditCardAuthSvc Bool: isValid

invoke (using WSDL)

authorize(int cardnum,
decimal amount) Service Provider

Concrete WSDL Document (includes Endpoint Definition)

we saw this part of the document before

this part is new

How WSDL & SOAP fit into the Web Services Stack

SERVICE ORCHESTRATION: BPEL SERVICE DESCRIPTION: MESSAGE FORMAT: WSDL SOAP

SERVICE DISCOVERY: UDDI

DATA FORMAT:
TRANSPORT: TRANSPORT:

XML, XML SCHEMA


HTTP, SMTP, JMS, others TCP but other transports are possible too !

if pink, then this standard is among those officially supported by the UAN Grammar

The Levels of Abstraction of a WSDL document

Messages Operations

e.g. Math service

portTypes e.g. add

e.g., SOAP

specifies address of endpoint http://some.url.com/etc/etc

Concrete WSDL Document (includes Endpoint Definition)

Interface specification part

Endpoint definition or implementation part

A Soap Example

client side code try { int res = stub.add(4, 5) request } catch (RemoteException e) response

How UAN Grammar WSDL files relate to Tibco Artificats

specifies input format as top level element of some schema

specifies output format as a top level element of some schema

How UAN Grammar WSDL files relate to Tibco Artificats

Resources for Further Study

http://www.w3schools.com (highly recommended for tutorials on SOAP, WSDL and many other web standards) http://msdn.microsoft.com/webservices/understanding/default.aspx Good articles covering the basics and advanced stuff http://searchwebservices.com Has an ask the expert section on SOAP and WSDL http://www.gotdotnet.com/team/tools/web_svc/default.aspx Good tools, including a wsdl verification tool http://www.capescience.com/downloads/wsdleditor/index.shtml Free WSDL editor, I tried it didnt like it. XML spy 5.0 is better comp.text.xml (Newsgroup) Books Java Web Services Architecture (were ordering copy for general use) Building Web Services with Java (you can borrow my copy) Organizations Software Development Forum Web Services Special Interest Group http://www.sdforum.org/p/l1.asp?SID=4&PID=607

Questions ?

You might also like