Anda di halaman 1dari 5

http://www.w3schools.com/ngws/ngws_webservices.

asp

Web services are small units of code built to handle a limited task.

What are Web Services?

•Web services are small units of code

•Web services are designed to handle a limited set of tasks

•Web services use XML based communicating protocols

•Web services are independent of operating systems

•Web services are independent of programming languages

•Web services connect people, systems and devices

Small Units of Code

Web services are small units of code designed to handle a limited set of tasks.

An example of a web service can be a small program designed to supply other


applications with the latest stock exchange prices. Another example can be a small
program designed to handle credit card payment.

XML Based Web Protocols

Web services use the standard web protocols HTTP, XML, SOAP, WSDL, and UDDI.

HTTP

HTTP (Hypertext Transfer Protocol) is the World Wide Web standard for
communication over the Internet. HTTP is standardized by the World Wide Web
Consortium (W3C).

XML

XML (eXtensible Markup Language) is a well known standard for storing, carrying,
and exchanging data. XML is standardized by the W3C.

SOAP

SOAP (Simple Object Access Protocol) is a lightweight platform and language


neutral communication protocol that allows programs to communicate via standard
Internet HTTP. SOAP is standardized by the W3C.

WSDL
WSDL (Web Services Description Language) is an XML-based language used to
define web services and to describe how to access them. WSDL is a suggestion by
Ariba, IBM and Microsoft for describing services for the W3C XML Activity on XML
Protocols.

UDDI

UDDI (Universal Description, Discovery and Integration) is a directory service where


businesses can register and search for web services.

UDDI is a public registry, where one can publish and inquire about web services.

Independent of Operating Systems

Since web services use XML based protocols to communicate with other systems,
web services are independent of both operating systems and programming
languages.

An application calling a web service will always send its requests using XML, and get
its answer returned as XML. The calling application will never be concerned about
the operating system or the programming language running on the other computer.

Benefits of Web Services

•Easier to communicate between applications

•Easier to reuse existing services

•Easier to distribute information to more consumers

•Rapid development

Web services make it easier to communicate between different applications. They


also make it possible for developers to reuse existing web services instead of
writing new ones.

Web services can create new possibilities for many businesses because it provides
an easy way to distribute information to a large number of consumers. One example
could be flight schedules and ticket reservation systems.

Net Remoting
.NET Remoting provides a powerful and high performance way of working with
remote objects. Architecturally, .NET Remote objects are a perfect fit for accessing
resources across the network without the overhead posed by SOAP based
WebServices. .NET Remoting is easier to use than Java's RMI, but definately more
difficult than creating a WebService.
Net Remoting components
To allow an application located in different application domain or process to
communicate with another one using .Net remoting technique, you have to just
build the following:

A remotable object. Which is an object that contain some properties and methods
located in one application domain and you need to call its methods or properties
from another application domain or process.

A host application. This is the host of the remotable object. It is also called the
server application. The main task of this host is to listen to requests for the hosted
remotable object.

A client application. This is the application which makes requests for the remotable
object.

Types of Remotable Objects

There are 3 types of remotable objects that you can configure and choose from
depending on the requirements of your application.

Single Call: The remotable object is intended to be called from one client / one
instance at a time.

Singleton Call: Several clients / several instances of the remotable object can be
utilized

Activation: Richer than Singleton in the regard of other aspects.


Remoting - In remoting, the applications involved in the communication process
may be located on the same computer, different computers in a same or different
network. In remoting, both applications know about each other. A proxy of an
application object is created on the other application.

Web Services - Communication between applications using web services is platform


independent and programming independent. The application that consumes the
web service, simply accesses it, without needing to know how this web service has
actually been implemented & created.

Web Services
1.It Can be accessed only over HTTP
2.It works in stateless environment
3.It support only the datatypes defined in the XSD type system, limiting the number
of objects that can be serialized.
4.It support interoperability across platforms, and are ideal for heterogeneous
environments.

.Net Remoting
1.It Can be accessed over any protocol
2.Provide support for both stateful and stateless environments through Singleton
and SingleCall objects
3.Using binary communication, .NET Remoting can provide support for rich type
system
4.It requires the client be built using .NET, enforcing homogenous environment.

Here are some of the major differences:


* ASP.NET Web Services may be accessed using HTTP only. Remoting objects may
be accessed over any protocol like TCP, SMTP, HTTP
* Web Service are Stateless, whereas Remoting has support for both stateless and
with-state environment, which is achieved using Singleton and Singlecall activation
* ASP.NET provides good support to create Web Services. They are easy to deploy.
In comparison, Remoting is little complex.
* Web services may be considered very reliable, due to the fact that they are
hosted on IIS. In remoting, if IIS is'nt used, then methods like plumbing have to be
used to ensure the application reliability.
* In .NET, when we create an application that consumes a web service, the web
service may or may not be built using .NET. But while implementing Remoting in
.NET, both the applications must be built in .NET.
* Using web services, only a limited number of types may be serialized (XML). Using
Remoting, objects like SOAP objects, Binary objects & XML Objects may be
serialized.

Public Class ConvertMoney


Inherits System.MarshalByRefObject
Public Function _
PoundsToDollars(ByVal BritishPounds As Double) As Double
Return BritishPounds * 1.44
End Function
End Class

Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Tcp
Imports RemoteConvertMoney
Module Module1
Sub Main()
Dim tcpChannel As New TcpChannel(7777)
ChannelServices.RegisterChannel(tcpChannel)
Dim ChangeMoney As New ConvertMoney
RemotingServices.Marshal(ChangeMoney, "ConvertMoney")
Console.ReadLine()
End Sub
End Module

Anda mungkin juga menyukai