Showing posts with label WebServices. Show all posts
Showing posts with label WebServices. Show all posts

Tuesday, 4 October 2011

WEB SERVICES SAMPLE.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Service : System.Web.Services.WebService
{
    public Service () {

        //Uncomment the following line if using designed components
        //InitializeComponent();
    }

    [WebMethod]
    public string HelloWorld() {
        return "Hello World";
    }
 
}

Excution Page:






Click Invoke  shown this XML FORMAT:

<?xml version="1.0" encoding="utf-8" ?>
  <string xmlns="http://tempuri.org/">Hello World</string>


Wednesday, 14 September 2011

What is web services.


Web services can convert application to web application.
Web services are published, found and used through the web.

Web service is application components.
Web services is open source protocol
Xml is the basis web services.

A web service is XML + HTTP.
XML using different platform and different programming language it express message and function.
HTTP is internet protocol.

Web service elements are:

SOAP (SIMPLE OBJECT APPLICATION PROTOCOL).
UDDI (UNIVERSAL DISCRIPTION DISCOVERY LANUAFGE).
WSDL (WEBSERVICES DISCRIPTION LANUAGE).

SOAP:

SOAP is xml based on the application to let application exchange information to HTTP.
Soap is format sending message.
Soap is communication protocol.
Soap is designed and communicates via internet.
Soap is platform independent.
Soap is language independent.
Soap is based on xml.
Soap is simple and extensible.
Soap is a w3c format.


WSDL:

WSDL is an xml based language locating and describing   web services.
WSDL stands
WSDL is based on xml.
WSDL is locating web services.
WSDL is descripting web services.
WSDL is w3c standards.

UDDI:

UDDI is a directory service where companies can register and search web services.
UDDI is a directory storing information about web services.
UDDI is a directory web a service describes about the UDDI.
UDDI is communicates with SOAP.
UDDI is Microsoft platform.