WSDL 1.1
WSDL (Web Service Description Language) is an XML markup language used to describe a web service. WSDL is programming language-, platform-, and protocol-agnostic. The fact that WSDL is protocol-agnostic means it can describe web services that use protocols other than SOAP and HTTP. This ability makes WSDL very flexible, but it has the nasty side effect of making WSDL abstract and difficult to understand. Fortunately, the WS-I Basic Profile 1.0 endorses only SOAP 1.1 over HTTP, so we’ll discuss WSDL as if that’s the only combination of protocols supported.
Imagine that you want to develop a web service component that implements the following interface:
public interface TravelAgent extends java.rmi.Remote { public StringmakeReservation(int cruiseID, int cabinID,
int customerId, double price)
throws java.rmi.RemoteException; }
Any application should be able to invoke this method using SOAP,
regardless of the language in which it was written or the platform on
which it is running. Since other programming languages
don’t understand Java, we have to describe the web
service in a language they do understand: XML. Using XML, and
specifically the WSDL markup language, we can describe the type of
SOAP messages that must be sent to invoke the
makeReservation( )
method. A WSDL document that
describes the makeReservation( )
method might look
like this:
<?xml version="1.0"?> <definitions name="TravelAgent" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" ...
Get Enterprise JavaBeans, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.