What is WSDL:-
1). Web Service Description Language
2). WSDL is a document written in XML
3). The document describes a Web Service
4). Specifies the location of the Service and the methods the service exposes
Why WSDL:-
1). Without WSDL, calling syntax must be determined from documentation that must be provided, or from examining wire Messages.
2). With WSDL, the generation of proxies for Web Services is automated in a truly language- and Platform-Independent way
Document Structure:-
1). Written in XML
2). Two types of sections
a). Abstract
b). Concrete
3). Abstract sections define SOAP Messages in a platform and language independent manner.
4). Site - specific matters Such as Serialization are relegated to the Concrete sections.
Abstract Definitions:-
1). TYPES: Machine-and language-Independent type definitions.
2). MESSAGES:- Contains function parameters (Input are separate from outputs) or
document descriptions.
3 ). PORT TYPES:- Refers to message definitions in messages section that describe function signatures(Operation name, Input parameters, Output parameters).
Code for Abstract WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="AirtickingBooking"
targetNamespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:client="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TYPE DEFINITION - List of services participating in this BPEL process
The default output of the BPEL designer uses strings as input and
output to the BPEL Process. But you can define or import any XML
Schema type and use them as part of the message types.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking" schemaLocation="xsd/AirtickingBooking.xsd" />
</schema>
</wsdl:types>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MESSAGE TYPE DEFINITION - Definition of the message types used as
part of the port type defintions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<wsdl:message name="AirtickingBookingRequestMessage">
<wsdl:part name="payload" element="client:AirticketBookingRequest"/>
</wsdl:message>
<wsdl:message name="AirtickingBookingResponseMessage">
<wsdl:part name="payload" element="client:AirticketBookingResponse"/>
</wsdl:message>
<wsdl:message name="AirticketCancelaionRequestMessage">
<wsdl:part name="payload" element="client:AirticketCancelaionRequest"/>
</wsdl:message>
<wsdl:message name="AirticketCancelationResponseMessage">
<wsdl:part name="payload" element="client:AirticketCancelationResponse"/>
</wsdl:message>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PORT TYPE DEFINITION - A port type groups a set of operations into
a logical service unit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- portType implemented by the AirtickingBooking BPEL process -->
<wsdl:portType name="AirtickingBooking">
<wsdl:operation name="ticketBooking">
<wsdl:input message="client:AirtickingBookingRequestMessage" />
<wsdl:output message="client:AirtickingBookingResponseMessage"/>
</wsdl:operation>
<wsdl:operation name="ticketCancelation">
<wsdl:input message="client:AirticketCancelaionRequestMessage" />
<wsdl:output message="client:AirticketCancelationResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PARTNER LINK TYPE DEFINITION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<plnk:partnerLinkType name="AirtickingBooking">
<plnk:role name="AirtickingBookingProvider">
<plnk:portType name="client:AirtickingBooking"/>
</plnk:role>
</plnk:partnerLinkType>
</wsdl:definitions>
<wsdl:definitions name="AirtickingBooking"
targetNamespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:client="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TYPE DEFINITION - List of services participating in this BPEL process
The default output of the BPEL designer uses strings as input and
output to the BPEL Process. But you can define or import any XML
Schema type and use them as part of the message types.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking" schemaLocation="xsd/AirtickingBooking.xsd" />
</schema>
</wsdl:types>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MESSAGE TYPE DEFINITION - Definition of the message types used as
part of the port type defintions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<wsdl:message name="AirtickingBookingRequestMessage">
<wsdl:part name="payload" element="client:AirticketBookingRequest"/>
</wsdl:message>
<wsdl:message name="AirtickingBookingResponseMessage">
<wsdl:part name="payload" element="client:AirticketBookingResponse"/>
</wsdl:message>
<wsdl:message name="AirticketCancelaionRequestMessage">
<wsdl:part name="payload" element="client:AirticketCancelaionRequest"/>
</wsdl:message>
<wsdl:message name="AirticketCancelationResponseMessage">
<wsdl:part name="payload" element="client:AirticketCancelationResponse"/>
</wsdl:message>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PORT TYPE DEFINITION - A port type groups a set of operations into
a logical service unit.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- portType implemented by the AirtickingBooking BPEL process -->
<wsdl:portType name="AirtickingBooking">
<wsdl:operation name="ticketBooking">
<wsdl:input message="client:AirtickingBookingRequestMessage" />
<wsdl:output message="client:AirtickingBookingResponseMessage"/>
</wsdl:operation>
<wsdl:operation name="ticketCancelation">
<wsdl:input message="client:AirticketCancelaionRequestMessage" />
<wsdl:output message="client:AirticketCancelationResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PARTNER LINK TYPE DEFINITION
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<plnk:partnerLinkType name="AirtickingBooking">
<plnk:role name="AirtickingBookingProvider">
<plnk:portType name="client:AirtickingBooking"/>
</plnk:role>
</plnk:partnerLinkType>
</wsdl:definitions>
Concrete Description:-
It contains Abstract WSDL + Bindings and Services
Bindings: Specifies bindings of each operation in the portType section.
Services:- Specifies port address of each binding.
Code for Concrete WSDL: like below
<wsdl:definitions name="AirtickingBooking"
targetNamespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking">
<wsdl:documentation>
<abstractWSDL>
http://192.168.1.12:8001/soa-infra/services/Sample/AirticketBooking!1.0/AirtickingBooking.wsdl</abstractWSDL>
</wsdl:documentation>
<plnk:partnerLinkType name="AirtickingBooking">
<plnk:role name="AirtickingBookingProvider">
<plnk:portType name="client:AirtickingBooking"/>
</plnk:role>
</plnk:partnerLinkType>
<wsdl:types>
<schema>
<import namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"
schemaLocation="http://192.168.1.12:8001/soa-infra/services/Sample/AirticketBooking/airtickingbooking_client_ep?XSD=xsd/AirtickingBooking.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="AirtickingBookingRequestMessage">
<wsdl:part name="payload" element="client:AirticketBookingRequest"/>
</wsdl:message>
<wsdl:message name="AirtickingBookingResponseMessage">
<wsdl:part name="payload" element="client:AirticketBookingResponse"/>
</wsdl:message>
<wsdl:message name="AirticketCancelaionRequestMessage">
<wsdl:part name="payload" element="client:AirticketCancelaionRequest"/>
</wsdl:message><wsdl:message name="AirticketCancelationResponseMessage">
<wsdl:part name="payload" element="client:AirticketCancelationResponse"/>
</wsdl:message>
<wsdl:portType name="AirtickingBooking">
<wsdl:operation name="ticketBooking">
<wsdl:input message="client:AirtickingBookingRequestMessage"/>
<wsdl:output message="client:AirtickingBookingResponseMessage"/>
</wsdl:operation>
<wsdl:operation name="ticketCancelation">
<wsdl:input message="client:AirticketCancelaionRequestMessage"/>
<wsdl:output message="client:AirticketCancelationResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AirtickingBookingBinding" type="client:AirtickingBooking"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ticketBooking">
<soap:operation style="document" soapAction="ticketBooking"/>
<wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:input>
<wsdl:output><soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ticketCancelation">
<soap:operation style="document" soapAction="ticketCancelation"/>
<wsdl:input><soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:input>
<wsdl:output><soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="airtickingbooking_client_ep">
<wsdl:port name="AirtickingBooking_pt" binding="client:AirtickingBookingBinding"><soap:address location="http://192.168.1.12:8001/soa-infra/services/Sample/AirticketBooking/airtickingbooking_client_ep"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
<wsdl:definitions name="AirtickingBooking"
targetNamespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking">
<wsdl:documentation>
<abstractWSDL>
http://192.168.1.12:8001/soa-infra/services/Sample/AirticketBooking!1.0/AirtickingBooking.wsdl</abstractWSDL>
</wsdl:documentation>
<plnk:partnerLinkType name="AirtickingBooking">
<plnk:role name="AirtickingBookingProvider">
<plnk:portType name="client:AirtickingBooking"/>
</plnk:role>
</plnk:partnerLinkType>
<wsdl:types>
<schema>
<import namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"
schemaLocation="http://192.168.1.12:8001/soa-infra/services/Sample/AirticketBooking/airtickingbooking_client_ep?XSD=xsd/AirtickingBooking.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="AirtickingBookingRequestMessage">
<wsdl:part name="payload" element="client:AirticketBookingRequest"/>
</wsdl:message>
<wsdl:message name="AirtickingBookingResponseMessage">
<wsdl:part name="payload" element="client:AirticketBookingResponse"/>
</wsdl:message>
<wsdl:message name="AirticketCancelaionRequestMessage">
<wsdl:part name="payload" element="client:AirticketCancelaionRequest"/>
</wsdl:message><wsdl:message name="AirticketCancelationResponseMessage">
<wsdl:part name="payload" element="client:AirticketCancelationResponse"/>
</wsdl:message>
<wsdl:portType name="AirtickingBooking">
<wsdl:operation name="ticketBooking">
<wsdl:input message="client:AirtickingBookingRequestMessage"/>
<wsdl:output message="client:AirtickingBookingResponseMessage"/>
</wsdl:operation>
<wsdl:operation name="ticketCancelation">
<wsdl:input message="client:AirticketCancelaionRequestMessage"/>
<wsdl:output message="client:AirticketCancelationResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AirtickingBookingBinding" type="client:AirtickingBooking"><soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ticketBooking">
<soap:operation style="document" soapAction="ticketBooking"/>
<wsdl:input>
<soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:input>
<wsdl:output><soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ticketCancelation">
<soap:operation style="document" soapAction="ticketCancelation"/>
<wsdl:input><soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:input>
<wsdl:output><soap:body use="literal" namespace="http://xmlns.oracle.com/CompensationHandlerDemo_jws/AirticketBooking/AirtickingBooking"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="airtickingbooking_client_ep">
<wsdl:port name="AirtickingBooking_pt" binding="client:AirtickingBookingBinding"><soap:address location="http://192.168.1.12:8001/soa-infra/services/Sample/AirticketBooking/airtickingbooking_client_ep"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
No comments:
Post a Comment