SlideShare a Scribd company logo
1 of 28
Creating and Using Web Services
Objectives
In this lesson, you will learn to:
Identify the need for Web services
Identify the enabling technologies in Web services
Create a Web service
Use a Web service in a Visual Basic .NET local application
Use a Web service in a Web application




    ©NIIT                Creating and Using Web Services/Lesson 15/Slide 1 of 28
Creating and Using Web Services
Web Service
 Is similar to a component that provides a specific
  functionality.
 Exposes a number of methods that provide functionality that
  can be used by one or more applications, regardless of the
  programming languages, operating systems, and hardware
  platforms used to develop them.
 Functionality can be accessed by applications by using
  Internet standards, such as HTTP and XML.




   ©NIIT               Creating and Using Web Services/Lesson 15/Slide 2 of 28
Creating and Using Web Services
Web Service (Contd.)
Can be of different types:
    One that provides a fundamental functionality, which
     can be used in multiple applications.
    Second that can integrate the existing applications that
     might have been created using different software and
     hardware platforms.
    Third that can be a means to exchange data in
     business-to-business transactions.




   ©NIIT              Creating and Using Web Services/Lesson 15/Slide 3 of 28
Creating and Using Web Services
Enabling Technologies Used in Web Services
 A Web service can be developed by using any
  programming language in .NET suite. However, it requires:
    A common data representation format in order to ensure
     the interoperability of the data exchanged by the client
     application and the Web service.
    A standard method for sending messages from the
     client application to the Web service and vice versa.
    A standard format for describing the Web service.
    A mechanism to allow client applications to discover the
     Web services and their locations.



   ©NIIT              Creating and Using Web Services/Lesson 15/Slide 4 of 28
Creating and Using Web Services
Enabling Technologies Used in Web Services
(Contd.)
Requirements are fulfilled by using various standards
such as:
    eXtensible Markup Language (XML) - Allows data
     interchange regardless of the hardware and software
     platform used to develop the application.
    Simple Object Access Protocol (SOAP) - Is a standard
     communication protocol for interchanging information in
     a structured format in a distributed environment.
    Web Services Description Language (WSDL) – Is an
     XML vocabulary that describes the methods that are
     exposed by a Web service.

   ©NIIT              Creating and Using Web Services/Lesson 15/Slide 5 of 28
Creating and Using Web Services
Enabling Technologies Used in Web Services
(Contd.)
    Universal Description Discovery and Integration (UDDI)
     - Is used as a standard mechanism to register and
     discover a Web service provided by various Web
     service providers.




   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 6 of 28
Creating and Using Web Services
Just a Minute…
What is the difference between a Web service and a
component?




   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 7 of 28
Creating and Using Web Services
Problem Statement 15.D.1
The Call Center application needs to provide a facility for
various departments to view the status of the queries received
from various customers. The organization also plans to
provide a facility to its customers to find out the status of their
queries through a Web site. For this, a reusable code needs to
be written so that both local and Web applications can access
the details about queries.




   ©NIIT               Creating and Using Web Services/Lesson 15/Slide 8 of 28
Creating and Using Web Services
Task List
Identify a mechanism for writing reusable code.
Identify the methods to be exposed to applications.
Create a Web service project.
Create the methods to be exposed to applications.
Execute the application.




   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 9 of 28
Creating and Using Web Services
Task 1: Identify a mechanism for writing reusable
code.
Result:
A Web service allows applications to transfer data by using
 standard protocols and data formats. Therefore, in the given
 scenario, you can create a Web service that exposes a
Web                 method to access query details.




   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 10 of 28
Creating and Using Web Services
Task 2: Identify the methods to be exposed to
applications.
Result:
In the given scenario, you need to create a Web service and
        expose a Web method that takes a query ID as a
parameter. The Web method should retrieve the details
about the query and populate a DataSet object with the
query details. This DataSet object should be returned to the
client application that uses the Web service.




   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 11 of 28
Creating and Using Web Services
Task 3: Create a Web service project.
Task 4: Create the methods to be exposed to
applications.
Code model for Web services
     A Web service is composed of two parts, the Web
      service entry point and the code that provides the
      functionality to be used by other applications.
     The .asmx file serves as the entry point for the Web
      service.
     The .asmx file accesses the code from precompiled
      assemblies and the code-behind (.vb) file
      corresponding to the Web service.

   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 12 of 28
Creating and Using Web Services
    The code-behind file imports the
     System.Web.Services namespace, which contains
     the classes that are required to build and use Web
     services.
    All Web service classes inherit the WebService class,
     which belongs to the System.Web.Services
     namespace.
    While writing code within the Web service class, you
     can use the following attributes:
          ® WebService:Used to provide additional information
           about the Web methods exposed by a Web service.
          ® WebMethod: Used for every method that needs to
           be exposed for use by other applications.

  ©NIIT               Creating and Using Web Services/Lesson 15/Slide 13 of 28
Creating and Using Web Services
Task 5: Execute the application.




  ©NIIT           Creating and Using Web Services/Lesson 15/Slide 14 of 28
Creating and Using Web Services
Problem Statement 15.D.2
A form needs to be designed in the Call Center application to
display the details about a query. The code for retrieving the
details about a query is provided in the GetQueryData Web
service. This Web service needs to be used in the Call Center
application to enable various departments of Diaz
Telecommunications to view the status of queries.




   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 15 of 28
Creating and Using Web Services
Task List
Identify the data to be displayed.
Design the user interface.
Write the code to display data by using the functionality
exposed by the Web service.
Execute the application.




   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 16 of 28
Creating and Using Web Services
Task 1: Identify the data to be displayed.
Result:
The data to be displayed includes:
     Query ID
     Date of submission
     Customer ID
     Employee ID
     Response date
     Status
     Feedback

   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 17 of 28
Creating and Using Web Services
Task 2: Design the user interface.
Task 3: Write the code to display data by using the
functionality exposed by the Web service.
To access the functionality exposed by a Web service,
perform the following tasks:
    Locate the Web service that provides the functionality
     required in the application.
    Create a proxy class for the Web service.
    Reference the proxy class in the application code.
    Instantiate the proxy class.



   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 18 of 28
Creating and Using Web Services
Task 4: Execute the application.




  ©NIIT           Creating and Using Web Services/Lesson 15/Slide 19 of 28
Creating and Using Web Services
Just a Minute…
2. How can you locate the Web services developed by a Web
   service provider?
3. Which attribute is used to describe a Web service?




   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 20 of 28
Creating and Using Web Services
ASP.NET
Is a powerful programming framework for the development
 of enterprise-class Web applications.
Is a part of the .NET Framework.
Provides access to all the features of the .NET Framework.
  Therefore, you can develop an ASP.NET Web application
  by using any of the programming languages provided in
.NET, such as Visual Basic .NET and C#.




   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 21 of 28
Creating and Using Web Services
Elements of ASP.NET
User interface - For accepting input and displaying text to a
 user in an ASP.NET Web application, Web Forms are used.
 The working of a Web Form is similar to that of a Windows
 Form except that the user interface is typically rendered in a
 Web browser.
Components – For providing reusable code and adding
business logic in an ASP.NET Web application, Web
services are used.
Data - For accessing data stored in a database in an
ASP.NET Web application, ADO.NET is used.




   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 22 of 28
Creating and Using Web Services
Web Form
 Allows you to create programmable Web pages that serve
  as a user interface for your Web application.
 Provides a combination of HTML, various Web Form
  controls, and code. Code provided in a Web Form is
  executed on a Web server running Internet Information
  Services (IIS) 5.0.
 Can be used to interact with any Web application regardless
  of the browser or the type of computer used by them.




   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 23 of 28
Creating and Using Web Services
Summary
In this lesson, you learned that:
A Web service exposes functionality that can be used by
        one or more applications, regardless of the
programming languages, operating systems, and hardware
platforms      used to develop them.
The functionality exposed by a Web service can be
accessed by applications by using Internet standards, such
      as HyperText Transfer Protocol (HTTP) and eXtensible
      Markup Language (XML).
A Web service can be created using any programming
language in .NET suite, such as Visual Basic .NET, Visual
C#.NET, and Visual C++.NET.

   ©NIIT              Creating and Using Web Services/Lesson 15/Slide 24 of 28
Creating and Using Web Services
Summary (Contd.)
Web services use eXtensible Markup Language for
interchanging data in a standard format between different
applications.
To be able to communicate with each other, a Web service
      and a client application must agree upon a common
      protocol. SOAP is a standard communications protocol
for   interchanging information in a structured format in a
      distributed environment.
To be able to use a Web service, the developers of a client
       application need to know the methods exposed by the
Web service and the parameters to be passed to these
methods.      Web Services Description Language (WSDL) is
a markup      language, which is used to describe a Web
service.
   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 25 of 28
Creating and Using Web Services
Summary (Contd.)
The Universal Description Discovery and Integration (UDDI)
       initiative is used to allow client applications to discover
the    Web services provided by various Web service
providers.
A Web service consists of two parts, the Web service entry
     point and the code that provides the functionality that
is   used by other applications.
The .asmx file serves as the entry point for the Web service.
The WebService attribute is an optional attribute that can
     be used to provide additional information about the
Web methods exposed by a Web service.
You must place the WebMethod attribute before the
declaration of every method that needs to be exposed for
use by other applications.
   ©NIIT              Creating and Using Web Services/Lesson 15/Slide 26 of 28
Creating and Using Web Services
Summary (Contd.)
In order to be able to access the functionality exposed by a
       Web service, you need to perform the following tasks:
    Locate the Web service that provides the functionality
     required in the application.
    Create a proxy class for the Web service.
    Reference the proxy class in the application code.
    Instantiate the proxy class.
Visual Studio .NET provides you with an integrated
development environment for creating Web applications
ranging from traditional Web sites consisting of several
HTML pages to sophisticated business-to-business
applications that provide Web-based components for
performing data interchange between trading partners.
   ©NIIT             Creating and Using Web Services/Lesson 15/Slide 27 of 28
Creating and Using Web Services
Summary (Contd.)
 The Web applications developed using Visual Studio.NET
       are built on ASP.NET, which is a powerful
programming framework for the development of enterprise-
class Web      applications.
ASP.NET is a part of the .NET Framework. It provides
access to all features of the .NET Framework.
An ASP.NET Web application has the same elements as
     any other client-server application. These elements are
the  user interface, components, and data.
Web services can be effectively used in both local and Web
     applications. Using a Web service in an ASP.NET Web
     application involves the same steps as in the case of a
     Windows application.
   ©NIIT            Creating and Using Web Services/Lesson 15/Slide 28 of 28

More Related Content

What's hot (19)

Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NET
 
Visual basic
Visual basicVisual basic
Visual basic
 
Sdi & mdi
Sdi & mdiSdi & mdi
Sdi & mdi
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
 
Visual basic 6
Visual basic 6Visual basic 6
Visual basic 6
 
As pnet
As pnetAs pnet
As pnet
 
Report on mall automation
Report on mall automationReport on mall automation
Report on mall automation
 
Mandar_Kamate_Resume _DotNet
Mandar_Kamate_Resume _DotNetMandar_Kamate_Resume _DotNet
Mandar_Kamate_Resume _DotNet
 
Asp.net
Asp.netAsp.net
Asp.net
 
02 intro to vb-net ide
02 intro to vb-net ide02 intro to vb-net ide
02 intro to vb-net ide
 
Dotnet ch1
Dotnet ch1Dotnet ch1
Dotnet ch1
 
Vc++ 4(mdi)
Vc++ 4(mdi)Vc++ 4(mdi)
Vc++ 4(mdi)
 
Vc++ 3
Vc++ 3Vc++ 3
Vc++ 3
 
Darrell's Resume
Darrell's ResumeDarrell's Resume
Darrell's Resume
 
Ashish tripath
Ashish tripathAshish tripath
Ashish tripath
 
Vbasic
VbasicVbasic
Vbasic
 
introduction to_mfc
 introduction to_mfc introduction to_mfc
introduction to_mfc
 
Visual Studio
Visual StudioVisual Studio
Visual Studio
 
R0701116121
R0701116121R0701116121
R0701116121
 

Similar to Vb net xp_15

MS .Net - An IntelliSense Way of Web Development
MS .Net - An IntelliSense Way of Web DevelopmentMS .Net - An IntelliSense Way of Web Development
MS .Net - An IntelliSense Way of Web DevelopmentEdureka!
 
Asp interview Question and Answer
Asp interview Question and Answer Asp interview Question and Answer
Asp interview Question and Answer home
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperKarthik Reddy
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperKarthik Reddy
 
Online bus pass registration
Online bus pass registrationOnline bus pass registration
Online bus pass registrationYesu Raj
 
Report : Dpilot - A Cloud Based File Transfer Web Application
Report : Dpilot - A Cloud Based File Transfer Web ApplicationReport : Dpilot - A Cloud Based File Transfer Web Application
Report : Dpilot - A Cloud Based File Transfer Web ApplicationKritika Phulli
 
Project Dpilot Documentation
Project Dpilot DocumentationProject Dpilot Documentation
Project Dpilot DocumentationDeepAnshu Sharma
 
Webinar: Microsoft .NET Framework : An IntelliSense Way of Web Development
Webinar: Microsoft .NET Framework : An IntelliSense Way of Web DevelopmentWebinar: Microsoft .NET Framework : An IntelliSense Way of Web Development
Webinar: Microsoft .NET Framework : An IntelliSense Way of Web DevelopmentEdureka!
 
Background Tasks with Worker Service
Background Tasks with Worker ServiceBackground Tasks with Worker Service
Background Tasks with Worker Servicessusere19c741
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netconline training
 
ASP.NET Unit-4.pdf
ASP.NET Unit-4.pdfASP.NET Unit-4.pdf
ASP.NET Unit-4.pdfabiraman7
 
IRJET- Build a Secure Web based Code Editor for C Programming Language
IRJET-  	  Build a Secure Web based Code Editor for C Programming LanguageIRJET-  	  Build a Secure Web based Code Editor for C Programming Language
IRJET- Build a Secure Web based Code Editor for C Programming LanguageIRJET Journal
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management systemYesu Raj
 
A Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdfA Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdflubnayasminsebl
 
Software Portfolio - SetFocus
Software Portfolio - SetFocusSoftware Portfolio - SetFocus
Software Portfolio - SetFocusAlexander Vogel
 
03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slides
03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slides03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slides
03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slidesmonchai sopitka
 

Similar to Vb net xp_15 (20)

MS .Net - An IntelliSense Way of Web Development
MS .Net - An IntelliSense Way of Web DevelopmentMS .Net - An IntelliSense Way of Web Development
MS .Net - An IntelliSense Way of Web Development
 
Asp
AspAsp
Asp
 
Asp interview Question and Answer
Asp interview Question and Answer Asp interview Question and Answer
Asp interview Question and Answer
 
Fayaz_CV
Fayaz_CVFayaz_CV
Fayaz_CV
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
 
dot net
dot netdot net
dot net
 
Online bus pass registration
Online bus pass registrationOnline bus pass registration
Online bus pass registration
 
Report : Dpilot - A Cloud Based File Transfer Web Application
Report : Dpilot - A Cloud Based File Transfer Web ApplicationReport : Dpilot - A Cloud Based File Transfer Web Application
Report : Dpilot - A Cloud Based File Transfer Web Application
 
Project Dpilot Documentation
Project Dpilot DocumentationProject Dpilot Documentation
Project Dpilot Documentation
 
Webinar: Microsoft .NET Framework : An IntelliSense Way of Web Development
Webinar: Microsoft .NET Framework : An IntelliSense Way of Web DevelopmentWebinar: Microsoft .NET Framework : An IntelliSense Way of Web Development
Webinar: Microsoft .NET Framework : An IntelliSense Way of Web Development
 
Background Tasks with Worker Service
Background Tasks with Worker ServiceBackground Tasks with Worker Service
Background Tasks with Worker Service
 
PRASANTHI P
PRASANTHI PPRASANTHI P
PRASANTHI P
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
ASP.NET Unit-4.pdf
ASP.NET Unit-4.pdfASP.NET Unit-4.pdf
ASP.NET Unit-4.pdf
 
IRJET- Build a Secure Web based Code Editor for C Programming Language
IRJET-  	  Build a Secure Web based Code Editor for C Programming LanguageIRJET-  	  Build a Secure Web based Code Editor for C Programming Language
IRJET- Build a Secure Web based Code Editor for C Programming Language
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 
A Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdfA Deep Dive into Android App Development 2.0.pdf
A Deep Dive into Android App Development 2.0.pdf
 
Software Portfolio - SetFocus
Software Portfolio - SetFocusSoftware Portfolio - SetFocus
Software Portfolio - SetFocus
 
03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slides
03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slides03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slides
03 Building an E-commerce Presence: Web Sites, Mobile Sites, and Apps slides
 

More from Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Recently uploaded

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Recently uploaded (20)

How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Vb net xp_15

  • 1. Creating and Using Web Services Objectives In this lesson, you will learn to: Identify the need for Web services Identify the enabling technologies in Web services Create a Web service Use a Web service in a Visual Basic .NET local application Use a Web service in a Web application ©NIIT Creating and Using Web Services/Lesson 15/Slide 1 of 28
  • 2. Creating and Using Web Services Web Service Is similar to a component that provides a specific functionality. Exposes a number of methods that provide functionality that can be used by one or more applications, regardless of the programming languages, operating systems, and hardware platforms used to develop them. Functionality can be accessed by applications by using Internet standards, such as HTTP and XML. ©NIIT Creating and Using Web Services/Lesson 15/Slide 2 of 28
  • 3. Creating and Using Web Services Web Service (Contd.) Can be of different types: One that provides a fundamental functionality, which can be used in multiple applications. Second that can integrate the existing applications that might have been created using different software and hardware platforms. Third that can be a means to exchange data in business-to-business transactions. ©NIIT Creating and Using Web Services/Lesson 15/Slide 3 of 28
  • 4. Creating and Using Web Services Enabling Technologies Used in Web Services A Web service can be developed by using any programming language in .NET suite. However, it requires: A common data representation format in order to ensure the interoperability of the data exchanged by the client application and the Web service. A standard method for sending messages from the client application to the Web service and vice versa. A standard format for describing the Web service. A mechanism to allow client applications to discover the Web services and their locations. ©NIIT Creating and Using Web Services/Lesson 15/Slide 4 of 28
  • 5. Creating and Using Web Services Enabling Technologies Used in Web Services (Contd.) Requirements are fulfilled by using various standards such as: eXtensible Markup Language (XML) - Allows data interchange regardless of the hardware and software platform used to develop the application. Simple Object Access Protocol (SOAP) - Is a standard communication protocol for interchanging information in a structured format in a distributed environment. Web Services Description Language (WSDL) – Is an XML vocabulary that describes the methods that are exposed by a Web service. ©NIIT Creating and Using Web Services/Lesson 15/Slide 5 of 28
  • 6. Creating and Using Web Services Enabling Technologies Used in Web Services (Contd.) Universal Description Discovery and Integration (UDDI) - Is used as a standard mechanism to register and discover a Web service provided by various Web service providers. ©NIIT Creating and Using Web Services/Lesson 15/Slide 6 of 28
  • 7. Creating and Using Web Services Just a Minute… What is the difference between a Web service and a component? ©NIIT Creating and Using Web Services/Lesson 15/Slide 7 of 28
  • 8. Creating and Using Web Services Problem Statement 15.D.1 The Call Center application needs to provide a facility for various departments to view the status of the queries received from various customers. The organization also plans to provide a facility to its customers to find out the status of their queries through a Web site. For this, a reusable code needs to be written so that both local and Web applications can access the details about queries. ©NIIT Creating and Using Web Services/Lesson 15/Slide 8 of 28
  • 9. Creating and Using Web Services Task List Identify a mechanism for writing reusable code. Identify the methods to be exposed to applications. Create a Web service project. Create the methods to be exposed to applications. Execute the application. ©NIIT Creating and Using Web Services/Lesson 15/Slide 9 of 28
  • 10. Creating and Using Web Services Task 1: Identify a mechanism for writing reusable code. Result: A Web service allows applications to transfer data by using standard protocols and data formats. Therefore, in the given scenario, you can create a Web service that exposes a Web method to access query details. ©NIIT Creating and Using Web Services/Lesson 15/Slide 10 of 28
  • 11. Creating and Using Web Services Task 2: Identify the methods to be exposed to applications. Result: In the given scenario, you need to create a Web service and expose a Web method that takes a query ID as a parameter. The Web method should retrieve the details about the query and populate a DataSet object with the query details. This DataSet object should be returned to the client application that uses the Web service. ©NIIT Creating and Using Web Services/Lesson 15/Slide 11 of 28
  • 12. Creating and Using Web Services Task 3: Create a Web service project. Task 4: Create the methods to be exposed to applications. Code model for Web services A Web service is composed of two parts, the Web service entry point and the code that provides the functionality to be used by other applications. The .asmx file serves as the entry point for the Web service. The .asmx file accesses the code from precompiled assemblies and the code-behind (.vb) file corresponding to the Web service. ©NIIT Creating and Using Web Services/Lesson 15/Slide 12 of 28
  • 13. Creating and Using Web Services The code-behind file imports the System.Web.Services namespace, which contains the classes that are required to build and use Web services. All Web service classes inherit the WebService class, which belongs to the System.Web.Services namespace. While writing code within the Web service class, you can use the following attributes: ® WebService:Used to provide additional information about the Web methods exposed by a Web service. ® WebMethod: Used for every method that needs to be exposed for use by other applications. ©NIIT Creating and Using Web Services/Lesson 15/Slide 13 of 28
  • 14. Creating and Using Web Services Task 5: Execute the application. ©NIIT Creating and Using Web Services/Lesson 15/Slide 14 of 28
  • 15. Creating and Using Web Services Problem Statement 15.D.2 A form needs to be designed in the Call Center application to display the details about a query. The code for retrieving the details about a query is provided in the GetQueryData Web service. This Web service needs to be used in the Call Center application to enable various departments of Diaz Telecommunications to view the status of queries. ©NIIT Creating and Using Web Services/Lesson 15/Slide 15 of 28
  • 16. Creating and Using Web Services Task List Identify the data to be displayed. Design the user interface. Write the code to display data by using the functionality exposed by the Web service. Execute the application. ©NIIT Creating and Using Web Services/Lesson 15/Slide 16 of 28
  • 17. Creating and Using Web Services Task 1: Identify the data to be displayed. Result: The data to be displayed includes: Query ID Date of submission Customer ID Employee ID Response date Status Feedback ©NIIT Creating and Using Web Services/Lesson 15/Slide 17 of 28
  • 18. Creating and Using Web Services Task 2: Design the user interface. Task 3: Write the code to display data by using the functionality exposed by the Web service. To access the functionality exposed by a Web service, perform the following tasks: Locate the Web service that provides the functionality required in the application. Create a proxy class for the Web service. Reference the proxy class in the application code. Instantiate the proxy class. ©NIIT Creating and Using Web Services/Lesson 15/Slide 18 of 28
  • 19. Creating and Using Web Services Task 4: Execute the application. ©NIIT Creating and Using Web Services/Lesson 15/Slide 19 of 28
  • 20. Creating and Using Web Services Just a Minute… 2. How can you locate the Web services developed by a Web service provider? 3. Which attribute is used to describe a Web service? ©NIIT Creating and Using Web Services/Lesson 15/Slide 20 of 28
  • 21. Creating and Using Web Services ASP.NET Is a powerful programming framework for the development of enterprise-class Web applications. Is a part of the .NET Framework. Provides access to all the features of the .NET Framework. Therefore, you can develop an ASP.NET Web application by using any of the programming languages provided in .NET, such as Visual Basic .NET and C#. ©NIIT Creating and Using Web Services/Lesson 15/Slide 21 of 28
  • 22. Creating and Using Web Services Elements of ASP.NET User interface - For accepting input and displaying text to a user in an ASP.NET Web application, Web Forms are used. The working of a Web Form is similar to that of a Windows Form except that the user interface is typically rendered in a Web browser. Components – For providing reusable code and adding business logic in an ASP.NET Web application, Web services are used. Data - For accessing data stored in a database in an ASP.NET Web application, ADO.NET is used. ©NIIT Creating and Using Web Services/Lesson 15/Slide 22 of 28
  • 23. Creating and Using Web Services Web Form Allows you to create programmable Web pages that serve as a user interface for your Web application. Provides a combination of HTML, various Web Form controls, and code. Code provided in a Web Form is executed on a Web server running Internet Information Services (IIS) 5.0. Can be used to interact with any Web application regardless of the browser or the type of computer used by them. ©NIIT Creating and Using Web Services/Lesson 15/Slide 23 of 28
  • 24. Creating and Using Web Services Summary In this lesson, you learned that: A Web service exposes functionality that can be used by one or more applications, regardless of the programming languages, operating systems, and hardware platforms used to develop them. The functionality exposed by a Web service can be accessed by applications by using Internet standards, such as HyperText Transfer Protocol (HTTP) and eXtensible Markup Language (XML). A Web service can be created using any programming language in .NET suite, such as Visual Basic .NET, Visual C#.NET, and Visual C++.NET. ©NIIT Creating and Using Web Services/Lesson 15/Slide 24 of 28
  • 25. Creating and Using Web Services Summary (Contd.) Web services use eXtensible Markup Language for interchanging data in a standard format between different applications. To be able to communicate with each other, a Web service and a client application must agree upon a common protocol. SOAP is a standard communications protocol for interchanging information in a structured format in a distributed environment. To be able to use a Web service, the developers of a client application need to know the methods exposed by the Web service and the parameters to be passed to these methods. Web Services Description Language (WSDL) is a markup language, which is used to describe a Web service. ©NIIT Creating and Using Web Services/Lesson 15/Slide 25 of 28
  • 26. Creating and Using Web Services Summary (Contd.) The Universal Description Discovery and Integration (UDDI) initiative is used to allow client applications to discover the Web services provided by various Web service providers. A Web service consists of two parts, the Web service entry point and the code that provides the functionality that is used by other applications. The .asmx file serves as the entry point for the Web service. The WebService attribute is an optional attribute that can be used to provide additional information about the Web methods exposed by a Web service. You must place the WebMethod attribute before the declaration of every method that needs to be exposed for use by other applications. ©NIIT Creating and Using Web Services/Lesson 15/Slide 26 of 28
  • 27. Creating and Using Web Services Summary (Contd.) In order to be able to access the functionality exposed by a Web service, you need to perform the following tasks: Locate the Web service that provides the functionality required in the application. Create a proxy class for the Web service. Reference the proxy class in the application code. Instantiate the proxy class. Visual Studio .NET provides you with an integrated development environment for creating Web applications ranging from traditional Web sites consisting of several HTML pages to sophisticated business-to-business applications that provide Web-based components for performing data interchange between trading partners. ©NIIT Creating and Using Web Services/Lesson 15/Slide 27 of 28
  • 28. Creating and Using Web Services Summary (Contd.) The Web applications developed using Visual Studio.NET are built on ASP.NET, which is a powerful programming framework for the development of enterprise- class Web applications. ASP.NET is a part of the .NET Framework. It provides access to all features of the .NET Framework. An ASP.NET Web application has the same elements as any other client-server application. These elements are the user interface, components, and data. Web services can be effectively used in both local and Web applications. Using a Web service in an ASP.NET Web application involves the same steps as in the case of a Windows application. ©NIIT Creating and Using Web Services/Lesson 15/Slide 28 of 28