You are on page 1of 31

ITE 3004 Internet Programming & Web Services

Assignment 02

Mathoaarachchi Y T
E121041035

Bachelor of Information Technology (BIT)


Faculty of Information Technology
University of Moratuwa
14/11/2015

ITE 3108

Internet Programming & Web Services

E121041035

Part 01
Question A
What are Web Services? Briefly explain using your own words.
Web services also called as application
services. Web services are the very
important building blocks in the move to
distributed computing on the internet. In
other words we can say a web service is a
collection of open protocols and standards
used for swapping data between applications or systems. Open standards and the focus on
communication and collaboration between people and applications have created an environment
where Web services are becoming the platform for application integration. Applications are
constructed using multiple Web services from many sources that work together irrespective of
where they reside or how they were implemented.
Behavioral Characteristics of web services are

XML based: Web services uses XML at data representation and data transportation layers.

Loosely Coupled: The Web service interface can change over time without compromising
the clients ability to interact with the service.

Ability to synchronous or asynchronous.

Supports Remote Procedure Calls.

Support document exchange.

Also Web services describes an identical way of integrating Web-based applications using the
XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone.

XML is used to tag the data.

SOAP is used to transfer the data.

WSDL is used for describing the services available.

UDDI is used for listing what services are available.

ITE 3108

Internet Programming & Web Services

E121041035

Web service is identified by a URL, just like any other Web site. The difference lies in the content
of what is sent in the request from the client to the service. There are lots of advantages of web
services. Some of them are

Interoperability (Connecting Different Applications): Web Services allows different


applications to talk to each other and share data and services among themselves.

Versatility: They can be accessed by humans via a Web-based client interface, or they
can be accessed by other applications and other Web services.

Reusability: One service might be utilized by several clients, all of which employ the
operations provided to fulfill different business objectives.

Standardized Protocol: Web Services uses standardized industry standard protocol for
the communication.

Cost Saving: All these benefits add up to significant cost savings. Easy interoperability
means the need to create highly customized applications for integrating data, which can be
expensive, is removed.

Some of disadvantages of web services are

Lack of access from browser

No links from email & Web pages, etc.

Does not leverage deployed HTTP proxies.

Security and privacy issues.

Won't leverage emerging Web developments (Semantic Web, AJAX XMLHttpRequest,


etc.)

Finally we can say Web services,

Is available over the Internet or private (intranet) networks

Uses a standardized XML messaging system

Is not tied to any one operating system or programming language

Is self-describing via a common XML grammar

Is discoverable via a simple find

ITE 3108

Internet Programming & Web Services

E121041035

Question B
What is SOAP? Explain its purpose.
SOAP stands for Simple Object Access Protocol. Soap is the application communications protocol
for XML Web services. SOAP is a specification that defines the XML format for messages. Some
characteristics of SOAP are:

SOAP is a format for sending and receiving messages

SOAP is platform independent

SOAP is based on XML

SOAP is a W3C recommendation

Extensibility (security and WS-routing are among the


extensions under development)

Neutrality (SOAP can operate over any transport


protocol such as HTTP, SMTP, TCP, UDP, or JMS)

The SOAP architecture consists of several layers of specifications for:

Message format

Message Exchange Patterns (MEP)

Underlying transport protocol bindings

Message processing models

Protocol extensibility

SOAP Advantages:

Platform independent.

Language independent.

Uses XML to send and receive messages.

Uses standard internet HTTP protocol.

SOAP runs over HTTP, which eliminates firewall problems.

SOAP is very simple compared to RMI, CORBA, and DCOM

Vendor neutral.

ITE 3108

Internet Programming & Web Services

E121041035

SOAP Disadvantages:

The SOAP contains no mention of security facilities.

SOAP 1.1 dont specify a default encoding for the message body.

SOAP deals with objects serialized to plain text and not with stringified remote object
references (interoperable object references, IORs, as defined in CORBA), distributed
garbage collection has no meaning.

SOAP clients do not hold any state-full references to remote objects.

The Purpose of SOAP

SOAP specifies precisely how to encode an HTTP header and an XML file so that a
program in one computer can call a program in an additional computer and pass along
information.

SOAP also specifies how the called program can return a response. Despite its frequent
combination with HTTP, SOAP supports other transport protocols as well.

A web service wants a mixture of XML, HTTP and a protocol under the category
application-specific. A web service uses XML data for exchanging. The weather service,
stock quote service, look up service of postal department are all sending XML messages
and receiving an XML reply. This is the pattern that dominates the web services. To
perform these web services, SOAP is the reliable protocol.

Question C
What are the elements that should be contained in a SOAP message?
There are 4 elements in SOAP message. They are
1. The SOAP Envelope (Required)
2. The SOAP Header (Optional)
3. The SOAP Body (Required)
4. The SOAP Fault (Optional)

ITE 3108

Internet Programming & Web Services

E121041035

The SOAP Envelope:

<Envelope> is the root element in every SOAP message and it is mandatory part of SOAP
message. It defines the start and the end of the message.
Start Envelope Tag <SOAP-Envelope>
End Envelope Tag </SOAP-Envelope>

It contains two child elements. They are an optional <Header> element, and a mandatory
<Body> element.

Every Envelope element must contain exactly one Body element.

If an Envelope contains a Header element, it must contain no more than one, and it must
appear as the very first child of the Envelope, before the Body.

The envelope changes when SOAP versions change.

The SOAP envelope is specified using the ENV namespace prefix and the Envelope
element.

Ex:
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
...
Rest of the message
...
</soap:Envelope>

The SOAP Header:

<Header> is an optional sub-element of the SOAP envelope


Start Header Tag <SOAP-Header>
End Header Tag </SOAP-Header>

ITE 3108

Internet Programming & Web Services

E121041035

It is used to pass application-related information that is to be processed by SOAP nodes


along the message path.

Header elements can occur multiple times.

Headers are intended to add new features and functionality

The SOAP header contains header entries defined in a namespace.

The header is encoded as the first immediate child element of the SOAP envelope.

When more than one header is defined in the SOAP message, all immediate child elements
of the SOAP header are interpreted as SOAP header blocks.

Actor attribute: The SOAP protocol defines a message path as a list of SOAP service
nodes. By setting the Actor attribute, the client can specify the recipient of the SOAP
header.

MustUnderstand attribute: Indicates whether a Header element is optional or mandatory.


Ex:
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<soap:Header>
<m:Trans xmlns:m="http://www.w3schools.com/transaction/"
soap:mustUnderstand="1">234
</m:Trans>
</soap:Header>
</soap:Envelope>
The SOAP Body:

<Body> is a mandatory sub-element of the SOAP envelope.


Start Body Tag <SOAP-Body>
End Body Tag </SOAP-Body>

It contains information intended for the ultimate recipient of the message.


7

ITE 3108

Internet Programming & Web Services

E121041035

In other words we can say, this is the element which contains call and response information
or else in other words body element contains the application defined XML data that are
being exchanged in the SOAP message.

Ex:
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<soap:Body>
<m:GetPrice xmlns:m="http://www.w3schools.com/prices">
<m:Item>Apples</m:Item>
</m:GetPrice>
</soap:Body>
</soap:Envelope>
The SOAP Fault:

<Fault> is a sub-element of the SOAP body and Fault element is an elective part of
SOAP Message.
Start Fault Tag <SOAP-Fault>
End Fault Tag </SOAP-Fault>

It is used for reporting errors. Including a predefined code, a description, and the address
of the SOAP processor that made and also SOAP Message can carry only one fault block.

For the HTTP binding, a positive response is linked to the 200 to 299 range of status
codes.

SOAP fault is linked to the 500 to 599 range of status codes

The SOAP Fault element has the 4 sub elements. They are;
<faultcode>: A code for identifying the fault
<faultstring>: A human readable explanation of the fault
<faultactor>: Information about who caused the fault to happen
8

ITE 3108

Internet Programming & Web Services

E121041035

<detail>: Holds application specific error information related to the Body


element
Ex:
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope/"
soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<soap:Body>
<m:GetPrice xmlns:m="http://www.w3schools.com/prices">
<m:Item>Apples</m:Item>
</m:GetPrice>
<soap:Fault>
<soap:faultstring>
Invalid Price..
</soap:faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Question D
A pizza shop accepts requests from their customers using their website. To order pizza, a
SOAP request GetPizza() is sent to the server with the customers information and the details
Of the ordered items as the parameters. The request to the web server should include
Customers name, address, phone number, pizza id, pizza name, topping, beverages etc. The
Namespace for the function is defined in http://www.romapizza.com/order". Write an
Appropriate SOAP request messages with headers.
(The program files of the below source codes are also attached in the ITE3108d_E121041035
folder)
9

ITE 3108

Internet Programming & Web Services

E121041035

getpizza.xml (Request message)


<?xml version="1.0" encoding="UTF-8"?>
// SOAP Envelope with encoding style
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope"
ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
//SOAP Header
<SOAP-ENV:Header>
<ns:session

xmlns:ns="http://www.romapizza.com/order"

ns:mustUnderstand="1">
<ns:session_id>123456789</ns:session_id>
</ns:session>
</SOAP-ENV:Header>
//SOAP Body
<SOAP-ENV:Body>
<GetPizza xmlns="http://www.romapizza.com/order">
<customer_name>Yasanthika Tharangani</customer_name>
<address>Kalutara</address>
<phoneNo>0716466137</phoneNo>
<pizzaId>pid001</pizzaId>
<pizzaName>Cheesy Hotdog Crown</pizzaName>
<topping>Add Mushroom</topping>
<beverage>Sprite</beverage>
</GetPizza>
//SOAP Fault
10

ITE 3108

Internet Programming & Web Services

<SOAP-ENV:Fault>
<SOAP-ENV:faultstring>
Required data must be filled
</SOAP-ENV:faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

11

E121041035

ITE 3108

Internet Programming & Web Services

E121041035

Screen shoot of getpizza.xml

Question E
Riku-Navi is a company that facilitates students and other Job seekers by providing
information of various companies. To find company details, a SOAP request
GetCompanyDetail() is sent to the server with the company id as the parameter. In response,
details of company are returned via XML. Write appropriate SOAP request and response
messages

with

headers.

The

namespace

for

the

function

is

defined

in

"http://www.rikunavi.org/cmpinfo".
(The program files of the below source codes are also attached in the ITE3108d_E121041035
folder)
12

ITE 3108

Internet Programming & Web Services

E121041035

jobrequest,xml (Request Message)


<?xml version="1.0" encoding="UTF-8"?>
//SOAP Envelope with encoding style
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope"
SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
//SOAP Header
<SOAP-ENV:Header>
<ns1:requestHeader xmlns:ns1="http://www.rukinavi.org/cmpinfo"
ns1:mustUnderstand="1">
<ns1:username>Administrator</ns1:username>
<ns1:password>admin123</ns1:password>
</ns1:requestHeader>
</SOAP-ENV:Header>
//SOAP Body
<SOAP-ENV:Body>
<GetCompanyDetail xmlns="http://www.rukinavi.org/cmpinfo">
<companyid>10005</companyid>
</GetCompanyDetail>
//SOAP Fault
<SOAP-ENV:Fault>
<SOAP-ENV:faultstring>
companyid is invalid. try again
</SOAP-ENV:faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
13

ITE 3108

Internet Programming & Web Services

Screen shoot of jobrequest.xml

14

E121041035

ITE 3108

Internet Programming & Web Services

E121041035

Jobresponce.xml (Response Message)


<?xml version="1.0" encoding="UTF-8"?>
// SOAP Envelope with encoding style
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope"
SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
// SOAP Header
<SOAP-ENV:Header>
<ns2:responseHeader xmlns:ns2="http://www.rukinavi.org/cmpinfo"
ns2:mustUnderstand="1">
<ns2:requestID>1200</ns2:requestID>
<ns2:requestTime>14.00</ns2:requestTime>
</ns2:responseHeader>
</SOAP-ENV:Header>
// SOAP Body
<SOAP-ENV:Body>
<GetCompanyDetailsResponse>
<companyRes>
<companyid>1003</companyid>
<companyname>Microsoft sriLanka</companyname>
<companytelephone>0112512342</companytelephone>
<companyaddress>No33,Galle Road, Colombo 6</companyaddress>
<jobList>

<jobid>1</jobid>
15

ITE 3108

Internet Programming & Web Services

<jobtitle>Senior Software Engineer</jobtitle>


<jobtype>Technical</jobtype>

</jobList>
</companyRes>
</GetCompanyDetailsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

16

E121041035

ITE 3108

Internet Programming & Web Services

Screen shoot of jobresponse.xml

17

E121041035

ITE 3108

Internet Programming & Web Services

E121041035

Part 2
Question A
WSDL supports four operation types. List them and briefly explain what they are, in your
Own words.
There are 4 operation types

1.

One-way: The endpoint receives a message

2. Request-Response: The endpoint receives a


message, and sends a correlated message.

3.

Solicit-Response: The endpoint sends a


message, and receives a correlated message.

4. Notification: The endpoint sends a message.


One-way:
A one-way message explains only an input message. It needs no output message and no fault. This
message interchange pattern is typically thought of as asynchronous messaging. In an RPC, a oneway operation signifies a procedure call to which no return value is assigned. This is the greatest
popular message exchange pattern employed today.
Ex: An operation representing the submission of an order to a purchasing system. Once the
order is sent, no immediate response is expected.
Example code:
<wsdl:definitions .... >
<wsdl:portType >
<wsdl:operation name="nmtoken">
<wsdl:input name="nmtoken"? message="qname"/>
</wsdl:operation>
</wsdl:portType >
</wsdl:definitions>
18

ITE 3108

Internet Programming & Web Services

E121041035

Request-Response:
A Request/response operation is an operation in which the service end point receives a message
and returns a message in response. In other words we can say, if an <operation> element is
declared with a single <input> element followed by a single <output> element, that means it is a
request/response operation.
Example Code:
<wsdl:definitions .... >
<wsdl:portType .... >
<wsdl:operation name="nmtoken" parameterOrder="nmtokens">
<wsdl:input name="nmtoken"? message="qname"/>
<wsdl:output name="nmtoken"? message="qname"/>
<wsdl:fault name="nmtoken" message="qname"/>*
</wsdl:operation>
</wsdl:portType >
</wsdl:definitions>
Solicit/response operation
A solicit/response operation is an operation in which the service endpoint sends a message and
expects to receive an answering message in response. This Operation is the opposite of the
request/response operation. In other way round, Solicit/response is similar to notification
messaging, except that the client is expected to respond to the Web service. With this type of
messaging the <portType> element first declares an <output> tag and then a <input> message
definition exactly the reverse of a request/response operation.
Ex: service that sends out order status to a client and receives back a receipt.
Example Code:
<wsdl:definitions .... >
<wsdl:portType .... >
19

ITE 3108

Internet Programming & Web Services

E121041035

<wsdl:operation name="nmtoken" parameterOrder="nmtokens">


<wsdl:output name="nmtoken"? message="qname"/>
<wsdl:input name="nmtoken"? message="qname"/>
<wsdl:fault name="nmtoken" message="qname"/>
</wsdl:operation>
</wsdl:portType >
</wsdl:definitions>
Notification operation
A notification operation is an operation in that the service endpoint sends a message to a client,
but it does not expect to receive a response. That means Notification is when a <portType> element
comprises an <output> tag, but no <input> message definitions. The client (subscriber) has
registered with the Web service to receive messages (notifications) about an event. No response is
required in this case, as most likely the status data is collected and logged and not acted upon
instantly.
Ex: This type of messaging is used by services that need to notify clients of events.
Example Code:
<wsdl:definitions .... >
<wsdl:portType .... > *
<wsdl:operation name="nmtoken">
<wsdl:output name="nmtoken"? message="qname"/>
</wsdl:operation>
</wsdl:portType >
</wsdl:definitions>

20

ITE 3108

Internet Programming & Web Services

E121041035

Question B
How do you define Binding in WSDL? Elaborate the answer in your own words.
Binding:
Binding is an element in WSDL document and it defines how message are transmitted, and the
location of the service. The <binding> element provides specific details on how a portType
operation will really be transmitted over the wire. The bindings can be made available through
numerous transports including HTTP GET, HTTP POST, or SOAP. It provides concrete
information on what protocol is being used to transfer <portType> operations. We can specify
numerous bindings for a single portType. The binding element has two attributes. They are name
and type attribute. The name attribute defines the name of the binding, and the type attribute
points to the port for the binding.
Ex: <binding name="Hello_Binding" type="tns:Hello_PortType">
Binding Element:
Concrete protocols: SOAP or HTTP
Messaging styles: RPC or documents styles
Formatting (encoding) styles: literal or SOAP encoding.
For SOAP protocol, the binding is <soap:binding>, and the transport is SOAP messages on top
of HTTP protocol.
SOAP Binding:
WSDL 1.1 includes built-in extensions for SOAP 1.1. It allows you to specify SOAP specific
details including SOAP headers, SOAP encoding styles, and the SOAPAction HTTP header. The
SOAP extension elements include:
soap:binding: This element indicates that the binding will be made available via SOAP.
soap:operation: This element indicates the binding of a specific operation to a specific
SOAP implementation.
soap:body: This element enables you to specify the details of the input and output
messages.

21

ITE 3108

Internet Programming & Web Services

E121041035

Example Code:
<binding name="Hello_Binding" type="tns:Hello_PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/ >
<operation name="sayHello">
<soap:operation soapAction="sayHello"/>
<input>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:examples:helloservice" use="encoded"/>
</input>
<output>
<soap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:examples:helloservice" use="encoded"/>
</output>
</operation>
</binding>
Question C
Briefly explain two limitations of WSDL.
WSDL incapability of being able to describe complex business Web services, which
normally are constituted by scoring multiple finergrained Web services. This disadvantage
is because of the absence of support for workflow descriptions in WSDL. In other words
we can say only supports connecting via the web server. That means authentication
required for every request.
This model containing service semantic clarifications, extension mechanisms, and the
support for new constructs in the SOAP 1.2 specification.
No configurable caching. That means all caching must be coded into application
22

ITE 3108

Internet Programming & Web Services

E121041035

All logging must be coded into application.


Requires more overhead than other integration methods for example, possible performance
issues without caching.
Question D
Write a WSDL file for a Web Service regarding Providing Information of Companies
(similar to Question E in Part-1). The service receives Company ID and returns the
information of the certain company. The binding element specifies HTTP SOAP as
transport. You may use your own assumptions and other WSDL elements as well. You can
define the messages, portType and other necessary things on your own. Try to make the
WSDL file to have elements and attributes as much as possible, using all what you have
studied regarding WSDL. You should elaborately explain your WSDL file.
job.xsd
<?xml version="1.0" encoding="UTF-8"?>
<! -- Root element definitions defines set of related services called getService-->
<definitions name="getService"
<! -- Own namespace for wdsl (I assumed the rukinavi as the service provider
therefore I considered this as a own namespace -- >
targetNamespace="http://www.rukinavi.org/cmpinfo"
xmlns="http://schemas.xmlsoap.org/wsdl/"
< -- Default namespace for soap -- >
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
< -- Default namespace for xsd -- >
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<! -- Types encapsulates schema definitions of communication types; here using
xsd -->
<types>
<! -- Element is a complex type element which is described further as below -- >
<element name="companyDetails">
<complexType>
23

ITE 3108

Internet Programming & Web Services

E121041035

<sequence>
<!the following lines describe the element names and their types which comes
under the companyDetails element-->
<element name="companyid" type="integer" />
<element name="companyname" type="string" />
<element name="companytelephoneno" type="string" />
<element name="companyaddress" type="string" />
<!jobList element is a complex type therefore it is further describes as below-->
<element name="jobList">
<complexType>
<sequence>
<!the following lines describe the element names and their types which comes
under the jobList complextype element-->
<element name="jobid" type="integer" />
<element name="jobtitle" type="string" />
<element name="jobtype" type="string" />
</sequence>
</complexType>
</element>
</sequence>
</complexType>
</element>
</types>
<! -- Message elements describe potential transactions -->
<! -- Request GetCompanyDetail is of type GetCompanyDetail-->
<message name="GetCompanyDetail">
24

ITE 3108

Internet Programming & Web Services

E121041035

<part name="companyid" type="xs:integer"/>


</message>
<! -- Response GetCompanyDetailResponse is of type companyDetailsResponse ->
<message name="GetCompanyDetailResponse">
<part name="value" type="xs:companyDetails"/>
</message>
<! -- portType describes messages in an operation -->
<portType name="GetDetails">
<! -- The value of operation eludes me -->
<operation name="GetCompanyName">
<! Request is taken as the input -->
<input message="GetCompanyDetail"/>
<! Request is taken as the output -->
<output message="GetCompanyDetailResponse"/>
</operation>
</portType>
<! -- binding states a serialization protocol for this service -->
<binding type="GetDetails" name="infor_binding">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<operation>
<! following line of my WSDL document describes name of the binding -->
<soap:operation soapAction=""/>
<! Responce is taken as the input -->
<input><soap:body use="literal"/></input>
<! Responce is taken as the output -->

25

ITE 3108

Internet Programming & Web Services

<output><soap:body use="literal"/></output>
</operation>
</binding>
<! -- service names a new service "getService" -->
<service name="getService">
<documentation>Web Service Discription Language for Getting Company
Information</documentation>
<! -- connect it to the binding "infor_binding" above -->
<port binding="infor_binding" name="infor_port">
<! -- give the binding a network address -->
<soap:address location="http://www.rukinavi.org/GetCompanyDetail" />
</port>
</service>
</definitions>

26

E121041035

ITE 3108

Internet Programming & Web Services

Screen shoot for job.xsd

27

E121041035

ITE 3108

Internet Programming & Web Services

E121041035

Question E
Elaborately explain the following WSDL documents in your own words.

<! -- Root element definitions defines set of related services called


EndorsementSearch-->
<definitions name="EndorsementSearch"

<! -- Own namespace for wdsl (I assumed the snowboard as the service provider
therefore I considered this as a own namespace) -- >
targetNamespace="http://namespaces.snowboard-info.com"
xmlns:es="http://www.snowboard-info.com/EndorsementSearch.wsdl"

<! -- Own namespace for xsd (I assumed the snowboard as the service provider
therefore I considered this as a own namespace) -- >
xmlns:esxsd=http://schemas.snowboard- info.com/EndorsementSearch.xsd

<! -- Default namespace for soap -- >


xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/

<! -- Default namespace for wdsl -- >


xmlns="http://schemas.xmlsoap.org/wsdl/">

<! -- omitted types section with content model schema info --> //comment

<! Message name is GetEndorsingBoarderRequest -- >


<message name="GetEndorsingBoarderRequest">

<! -- This line of the document specifies the data type and the esxsd is the
namespace. -- >
<part name="body" element="esxsd:GetEndorsingBoarder"/>
</message>
28

ITE 3108

Internet Programming & Web Services

E121041035

<! -- Name of the response -- >


<message name="GetEndorsingBoarderResponse">

<! -- Element of the message ans esxsd is the namespace -- >


<part name="body" element="esxsd:GetEndorsingBoarderResponse"/> //
</message>

<! -- This is the port type name -- >


<portType name="GetEndorsingBoarderPortType">

<! -- //this is the operation name inside this there are three operation types as
input, output and fault as follow -- >
<operation name="GetEndorsingBoarder">

<! -- Request is taken as the input -- >


<input message="es:GetEndorsingBoarderRequest"/>

<! -- Reponses is taken as output -- >


<output message="es:GetEndorsingBoarderResponse"/>

<! -- If there is any error in the request or response we can use this error part to
indicate that error -- >
<fault message="es:GetEndorsingBoarderFault"/>
</operation>
</portType>

<! -- To describe the binding name which is EndorsementSearchSoapBinding -- >


<binding name="EndorsementSearchSoapBinding"

<! -- To describe the binding type which is GetEndorsingBoarderPortType -- >


type="es:GetEndorsingBoarderPortType">

29

ITE 3108

Internet Programming & Web Services

E121041035

<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>

<! -- define operation name and soap action as in to where it is referred to -- >
<operation name="GetEndorsingBoarder">
<soap:operation
soapAction="http://www.snowboard-info.com/EndorsementSearch"/>
<input>

<! -- literal is used to specify how the output is encoded and the namespace is
taken using the above mentioned schema -- >
<soap:body use="literal"
namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
</input>
<output>

<! -- literal is used to specify how the output is encoded and the namespace is
taken using the above mentioned schema -- >
<soap:body use="literal"
namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
</output>
<fault>

<! -- //literal is used to specify how the fault is encoded and the namespace is
taken using the above mentioned schema -- >
<soap:body use="literal"
namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
</fault>
</operation>
</binding>

<! -- Service names a new service as EndorsementSearchService -- >


30

ITE 3108

Internet Programming & Web Services

E121041035

<service name="EndorsementSearchService"> <documentation>snowboardinginfo.com Endorsement Service</documentation>

<! -- Connect it to the binding mentioned above -- >.


<port name="GetEndorsingBoarderPort"
binding="es:EndorsementSearchSoapBinding">

<! -- Give the binding and network address -- >


<soap:address location="http://www.snowboard-info.com/EndorsementSearch"/>
</port>
</service>

31

You might also like