Professional Documents
Culture Documents
BLOCKS
N.RAJGANESH
ASSOCIATE PROFESSOR
DEPT OF INFORMATION TECHNOLOGY
A.V.C COLLEGE OF ENGINEERING
WEB SERVICE
• A Web Service is a class that allows its methods
to be called by methods on other machines via
common data formats and protocols, such as XML
and HTTP.
SOAP / XML
HTTP
TCP / IP
Services
Here the body contains the name of the method and two
parameters that correspond to the call made with in the client
code.
SOAP RESPONSE MESSAGE
• The SOAP body of the response includes a
< Addition Result > element that contains the
response from the Web Service and identifies it as a
string type.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AdditionResponse xmlns="http://tempuri.org/">
<AdditionResult>int</AdditionResult>
</AdditionResponse>
</soap:Body>
</soap:Envelope>
SOAP EXCEPTIONS
SOAP Exceptions
There is one class called SOAPException is used for exceptions handling here. It includes
four properties that provide information about the exception.
Message - The error message for the exception.
Actor - The URL of the WebService that throw the exception.
Code - An XMLQualifiedName object that specifies one of
four SOAP fault codes that categorize the exception.
Detail - It contains information about the error.
The SOAP Exception class contains static fields that can be compared with the code value
to broadly classify the exception. These field has the following.
ServerFaultCode - The errors occurs on the server and is not related to the SOAP
message.
Google
Search
News
Service
Figure 4. Service Description
WSDL STRUCTURE
WSDL document can be divided into:
Abstract Definitions –
Defines the SOAP messages in a platform
independent language and a neutral manner.
It help to extend service definitions and
enhance the reusability.
Agreed upon Definitions - It enables multiple
protocol bindings such as HTTP and SMTP.
WSDL 1.1