Www.monash.edu.au.NET XML Web Services Monash University Semester 1, March 2006.

Slides:



Advertisements
Similar presentations
C2: Introduction to OpenEdge® Integration Technologies
Advertisements

1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 2 Getting Started.
Distributed Systems Architectures
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2003 Pearson Education, Inc. Slide 1.
Processes and Operating Systems
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Jeff Mischkinsky Nickolas Kavantzas Goran Olsson Web Services Choreography.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
19 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Developing Web Services.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
4 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: Servlets.
11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Create an Application Title 1A - Adult Chapter 3.
Indigo Jonathan Turnbull Nick Cartwright Ivan Konontsev Chris Bright.
1 Copyright ©2008 Serena Software, Inc. ZMF Web Services John Skelton Principal Software Developer, Serena.
Overview Environment for Internet database connectivity
Server Access The REST of the Story David Cleary
Written by Liron Blecher
Week 2 The Object-Oriented Approach to Requirements
Siebel Web Services Siebel Web Services March, From
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 31 Slide 1 Service-centric Software Engineering.
Intesar G Ali IT DepartmentPalestinian Land Authority Web services Prepared by: Intesar Ali IT Department PLA August 2010.
Copyright 2007, Information Builders. Slide 1 Introduction to Web Services Efrem Litwin Director, WebFOCUS Integration Products Information Builders.
Tuesday, June 10, 2003 Web Services Brief Overview & Security Assertion Coordinator Pattern by Mohammad Abushadi & Riaz Ahmed for Security Group CSE -
Matthew Kubicina CIS 764 Kansas State University.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
31242/32549 Advanced Internet Programming Advanced Java Programming
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Presentation 7 part 2: SOAP & WSDL.
Systems Analysis and Design in a Changing World, Fifth Edition
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
PSSA Preparation.
Essential Cell Biology
Presentation 10 SOAP on the Microsoft Platform (.NET)
Introduction Peter Dolog dolog [at] cs [dot] aau [dot] dk Intelligent Web and Information Systems September 9, 2010.
Chapter 9: Using Classes and Objects. Understanding Class Concepts Types of classes – Classes that are only application programs with a Main() method.
Web Services Web Services are the basic fundamental building blocks of invoking features that can be accessed by an application program. The accessibility.
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
XML Web Services in Visual Studio ®.NET NameTitleCompany.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
XML Web Services ASP.NET. Overview of Web Services (Page 1) Web Service – Part or all of a Web application that is publicly exposed so that other applications.
XML Web Services in Visual Studio.NET Peter Ty Developer Evangelist.NET and Developer Group.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
.Net and Web Services Security CS795. Web Services A web application Does not have a user interface (as a traditional web application); instead, it exposes.
Web Services. ASP.NET Web Services  Goals of ASP.NET Web services:  To enable cross-platform, cross- business computing  Great for “service” based.
Web Services. Abstract  Web Services is a technology applicable for computationally distributed problems, including access to large databases What other.
1 Introduction to Web Application Introduction to Web Services.
XML and Web Services (II/2546)
Kemal Baykal Rasim Ismayilov
ASP.NET Web Services.  A unit of managed code installed under IIS that can be remotely invoked using HTTP.
Week Six : Writing Web Services Aims: Creating and Consuming student’s first Web Services Learning Outcomes: Familiarity with VS.NET for creating and consuming.
Chapter 7: Creating and Consuming XML Web Services Understanding XML Web Services Creating XML Web Services Deploying and Discovering XML Web Services.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
.NET Mobile Application Development XML Web Services.
Jim Fawcett CSE681 – SW Modeling & Analysis Spring 2005
Sabri Kızanlık Ural Emekçi
ASP.NET Web Forms and Web Services
The future of distributed systems architecture
Distributed System using Web Services
Distributed System using Web Services
Presentation transcript:

XML Web Services Monash University Semester 1, March 2006

2 Overview Current Business Models What are XML Web Services and why use them How web services are developed using.NET Extensions to Web Services using.NET

3 Business Applications 3-tier Business applications must separate software into 3 tiers Separate the business process from the user interface and data layers User Interface Business Objects Data Layers

4 Extend your business With 3-tier architecture, you restrict your business to your applications With global economy, you want different global companies to use your software Need to provide another tier to your business process Service Oriented Architecture is what can be used to expose your business to the software world

5 Service Oriented Architecture ProviderConsumer Broker PublishSearch Bind/Invoke

6 What are XML Web Services W3C Definition –“… software application identified by a URI, whose interfaces and binding are capable of being defined, described and discovered by XML artefacts and supports direct interactions with other software applications using XML based messages via internet- based protocols.”

7 Distributed Programming Model Client Server Web Services Description Language (WSDL) Server StubClient Proxy SOAP, XML-RPC Transport (HTTP, FTP, IIOP etc.)

8 Why XML Web Services Supports n-tier Application Architecture (Façade Pattern should be used) Provide a web interface to you current business infrastructure Use web protocols and standards to communicate and transfer information Can be used to communicate through firewalls that block other Distributed Programming models

9 Web Service RMI Service DCOM Service Consumer   Firewall Port 80 Web Services and Firewalls

10 Web Services Standards and Protocols Open Web Protocols –HTTP, XML, SOAP etc. Web Services Contracts/Description –WSDL Advertising and Discovery –UDDI, Disco

11 Service Oriented Architecture ProviderConsumer Broker PublishSearch Bind/Invoke Applications UDDI WSDL

12 Business Applications n-tier Web Service Communication

13 ASP.NET XML Web Services Must use an.ASMX file to create or generate a web interfaceMust use an.ASMX file to create or generate a web interface An ASMX file can contain code or point to a DLL using Code behindAn ASMX file can contain code or point to a DLL using Code behind Must inherit from System.Web.Services.WebService or implement System.Web.Services.WebService as a custom attribute of your classMust inherit from System.Web.Services.WebService or implement System.Web.Services.WebService as a custom attribute of your class

14 Demonstration HelloWorldWS Basic Hello World in.NET

15 Create a Web Service in ASP.NET Declaring Web Services –.ASMX file Implementation –.CS file System.Web.Services.WebService public class HelloWorld: System.Web.Services.WebService{[WebMethod] public string Hello () { return “Hello World”; }}

16 Web Method Description - a property which makes a description available to a WSDL fileDescription - a property which makes a description available to a WSDL file MessageName - the method name used when calling a Web MethodMessageName - the method name used when calling a Web Method Enable Session - defines whether a session state is enabledEnable Session - defines whether a session state is enabled TransactionOption - indicates transaction supportTransactionOption - indicates transaction support CacheDuration – defines the length of time the method invocation should be cached forCacheDuration – defines the length of time the method invocation should be cached for

17 Stateless and Statefull services Stateless means a web service losses its state Web services are normally stateless Usually provide access to state information such as databases and XML files.NET Web services are stateless by default More will be covered in Module 8

18 Publishing Web Services Files –Web.Config and Global.asax file –Assemblies and.asmx files IIS structure –Must create a virtual directory –Must ensure that the web service has appropriate permissions to access and modify resources

19 Consuming Web Services Accessing Web Services from IE –Demonstration Proxy class WSDL tool –Generate source file. Need to compile –Default is in C# Visual Studio.NET automates this process by creating wsdl

20 Demonstration A stock service demonstration localhost/WapStockClient/Stocks.aspx

21 WS State Management Statement management objects –Application –Session EnabledSession property in WebMethod attribute –To enable Session object.

22 State Management Web Services are stateless Use ASP.NET session state mechanism –Restricted to a logical application –Context in which a user communicates to a server –Functionality >Request identification and classification >Store data across multiple requests >Session events >Release of session data –.NET State Server Process

23 State Management Each request of a Web Service its class instance is instantiated and thrown away when it is no longer used –i.e. each time you call a method the class variable values are not available be the web service has be re-instantiated If data is required to be used between different requests, the ASP.NET built-in session state mechanisms must be used

24 State Management (cont…) Web services have access to the same state management options as other ASP.NET applications such as the Session and Application objects and cookies Data stored in the Session object is available only when the EnableSession property of the WebMethod attribute is set to true. Access to the Application object is automatic however

25 State Management (e.g.) Declaring a Web service method, with the EnableSession property equal to WebMethod attribute to true. [WebMethod(EnableSession=true)] public string YourName(string name) { if(Session["Name"] == null) if(Session["Name"] == null) Session.Add("Name", name); Session.Add("Name", name); return Session["Name"].ToString(); return Session["Name"].ToString();}[WebMethod(EnableSession=true)] public string YourName(string name) { if(Session["Name"] == null) if(Session["Name"] == null) Session.Add("Name", name); Session.Add("Name", name); return Session["Name"].ToString(); return Session["Name"].ToString();} [WebMethod(EnableSession=true)] public string GetName() { if(Session["Name"] == null) if(Session["Name"] == null) return "no name recorded"; return "no name recorded"; else else return Session["Name"].ToString(); return Session["Name"].ToString();}[WebMethod(EnableSession=true)] public string GetName() { if(Session["Name"] == null) if(Session["Name"] == null) return "no name recorded"; return "no name recorded"; else else return Session["Name"].ToString(); return Session["Name"].ToString();}

26 Caching Uses the ASP.NET Caching Model Improves the performance of application by caching messages Parser Assembly Cache Memory Complier Output Cache Key Normal Cached

27 Web Service Execution Model Synchronous –Like any other call to class methods Asynchronous –Split the method into two code blocks >BeginMethodName >EndMethodName –CLR determines if and when operation has finished

28 Asynchronous invocation Exposed in generated proxy class –Begin and End method Begin method –Return IAsyncResult –Parameters >AsyncCallback >Object End method –Return function return type –First parameter is IAsyncResult

29 Demonstration Building an application that supports asynchronous invocation

30 Transaction Support in Web Services Same as COM+ and Microsoft Transaction Server Declarative Transaction TransactionOption property in WebMethod attribute

31 Windows security Client application –NetworkCredential class >Username, password, domain –CredentialCache class –Credentials property in proxy class

32 Web Services Security ASP.NET Security –Windows security, IIS security –Web.config file Customised SOAP-based security –SOAP Header

33 SOAP Header Inherit from SOAPHeader class Declare a public attribute Apply SOAPHeader attribute to WebMethod –MemberName property However, this is.NET specific

34 Global XML Architecture GXA provides uniform way of using XML web services A Microsoft specific initiative to web services Supports new extensions to web services Implemented in.NET using Web Services Enhancements

35 Web Services Enhancements 2.0 Provides additional Web Services capabilities Additional WS specifications –WS-Security –WS-Policy –WS-Trust –WS-Addressing –Etc.

36 WS-Security By OASIS Enhancements to SOAP messaging A general purpose mechanism for secure messaging Support symmetric and public key technologies

37 WSE 2.0 Demo Using Asymmetric Encryption Using digital certificates

38 Web Service Technologies EJB using Tomcat & Sun ONE toolkit BEA Weblogic IBM Web Sphere.NET using ASP.NET and IIS Many more available

39 Communication between systems

40 Conclusion Businesses use web services for interoperability.NET offers web services through ASP.NET ASP.NET provides caching and supports the Global XML architecture through Web Services extensions