Webservies on .Net

download Webservies on .Net

of 20

Transcript of Webservies on .Net

  • 7/29/2019 Webservies on .Net

    1/20

    Web Services using .NETBarry CorneliusComputing Services, University of OxfordDate: 6th May 2004; first created: 31st January 2002http://users.ox.ac.uk/~barry/papers/mailto:[email protected]

    1 Introduction 12 What is a Web Service? 2

    3 Using .NET to provide a Web Service 2

    4 Writing .NET programs to access a Web Service 4

    5 Communicating with a .NET Web Service 7

    6 Monitoring the HTTP traffic 9

    7 Providing more than just the basics 9

    8 Adding security to a Web Service 10

    9 Using a language other than C# 14

    10 Describing a Web Service using WSDL 14

    11 Other products for Web Services 15

    12 Using Web Services provided by other sites 16

    13 References 19

    1 Introduction

    James Snell (coauthor of the book Programming Web Services with SOAP [36]) says:

    Web services are not just a passing fad. While there is a lot of hype out there, there is also a fundamental

    change going on in the way the Internet works, and the various web services technologies are part of this

    change. It will be important for people to understand these technologies and to know how they work.

    Web services technologies represent a fundamental shift in the way web applications will be written for e-

    businesses. Sure, there will still be web pages and HTML, and JavaScript development, but many e-business

    applications will increasingly rely on programmatic interfaces that tie Internet-based applications togetheron a more functional level. This is what web services do for us.

    This paper:

    introduces the idea of a Web Service;

    demonstrates how the .NET Framework makes it easy to provide a Web Service;

    demonstrates how the .NET Framework makes it easy to access a Web Service;

    examines how you communicate with a Web Service (HTTP using SOAP);

    looks at a tool for monitoring the HTTP traffic;

    introduces other specifications for providing Web Services;

    considers the security features offered by the WS-Security specification;

    introduces a language (WSDL) that is used to describe the services offered by a Web Service;

    indicates what non-Microsoft products can be used for Web Services;

    demonstrates how an Apache Axis client can be used to access a .NET Web Service;

    mentions how businesses can publish/discover services (UDDI);

    demonstrates with examples how easy it is to use Web Services provided around the world.

    1

  • 7/29/2019 Webservies on .Net

    2/20

    2 What is a Web Service?

    2.1 A definition

    A Web Service is the provision of one or more methods that can be invoked by some external site. The external

    site contacts the webserver of the site providing the Web Service to get a method of the Web Service executed.

    It is usually a program running on the external site that wants the result of a call of the method. A site might be

    providing Web Services in several different areas.

    2.2 An example

    In their book [35] about the .NET Framework, Thai and Lam provide the following answer to the question How

    can software be viewed as services?:

    The example we are about to describe might seem far-fetched; however, it is possible with current

    technology. Imagine the following. As you grow more attached to the Internet, you might choose to replace

    your computer at home with something like an Internet Device, specially designed for use with the Internet.

    Lets call it ani D e v

    . With this device, you can be on the Internet immediately. If you want to do word

    processing, you can point youri D e v

    to a Microsoft Word service somewhere in Redmond and type away

    without the need to install word processing software. When you are done, the document can be saved at an

    i S t o r e server where you can later retrieve it. Notice that for you to do this, the i S t o r e server must host

    a software service to allow you to store documents. Microsoft would charge you a service fee based on the

    amount of time your word processor is running and which features you use (such as the grammar and spell

    checkers). Thei S t o r e

    service charges vary based on the size of your document and how long it is stored.

    Of course, all these charges wont come in the mail, but rather through an escrow service where the moneycan be piped from and to your bank account or credit card.

    All of these things can be done today with Web Services.

    3 Using .NET to provide a Web Service

    3.1 Providing the code to be executed

    If the Web Service is provided using the .NET Framework, the methods of each Web Service may be written in

    any .NET language. Although we could provide all of the code ourselves, Visual Studio.NET (Microsofts IDE

    for the .NET Framework) has a wizard that generates the two files necessary to provide a Web Service. If we tell

    Visual Studio.NET to use C# and tell it to provide a Web Service class calledS e r v i c e 1

    , it will produce the files

    S e r v i c e 1 . a s m x

    andS e r v i c e 1 . a s m x . c s

    . It will produce these files in a directory accessible by IIS (Internet

    Information Server (Microsofts webserver software)). We will assume that this webserver is at w w w . a . c o m .

    The fileS e r v i c e 1 . a s m x . c s

    contains some code in C#. All we have to do is to add the code of each method of

    our Web Service to theS e r v i c e 1 . a s m x . c s

    file. So we could add the method:

    0001: [WebMethod]0002: public double ToFahrenheit(double pCentigrade)0003: {0004: return 32 + pCentigrade*9/5;0005: }

    As shown above, we have to supply aW e b M e t h o d

    attribute for each method of the class that we wish to be

    accessible through the Web Service.

    2

  • 7/29/2019 Webservies on .Net

    3/20

    Such methods are declared in a class that is derived from the class W e b S e r v i c e of the S y s t e m . W e b . S e r v i c e s

    namespace. It is also usual to include a W e b S e r v i c e attribute:

    0006: [WebService]0007: public class Service1 : System.Web.Services.WebService0008: {0009: ...0010: }

    Note: if this class provides other methods that do not have a W e b M e t h o d attribute, they will not be (directly)

    accessible by an external site.

    Here is an example of the code that is generated by Visual Studio.NETs wizard. I only typed in lines 2425 andlines 6165:

    0011: using System;0012: using System.Collections;0013: using System.ComponentModel;0014: using System.Data;0015: using System.Diagnostics;0016: using System.Web;0017: using System.Web.Services;0018:0019: namespace ServerConvert0020: {0021: /// 0022: /// Summary description for Service1.0023: /// 0024: [WebService(Namespace="http://www.a.com/webservices/",0025: Description="This Web Service provides temperature conversion services.")]0026: public class Service1 : System.Web.Services.WebService0027: {0028: public Service1()0029: {0030: //CODEGEN: This call is required by the ASP.NET Web Services Designer0031: InitializeComponent();0032: }0033:0034: #region Component Designer generated code0035:0036: //Required by the Web Services Designer0037: private IContainer components = null;0038:0039: /// 0040: /// Required method for Designer support - do not modify0041: /// the contents of this method with the code editor.0042: /// 0043: private void InitializeComponent()0044: {0045: }0046:0047: /// 0048: /// Clean up any resources being used.0049: /// 0050: protected override void Dispose( bool disposing )0051: {0052: if(disposing && components != null)0053: {0054: components.Dispose();0055: }0056: base.Dispose(disposing);0057: }0058:0059: #endregion0060:0061: [WebMethod(Description="This converts from Centigrade to Fahrenheit.")]0062: public double ToFahrenheit(double pCentigrade)0063: {0064: return 32 + pCentigrade*9/5;0065: }0066: }0067: }

    The above code gives more complicated forms of theW e b M e t h o d

    andW e b S e r v i c e

    attributes.

    3

  • 7/29/2019 Webservies on .Net

    4/20

    3.2 Providing a WWW page for accessing the code

    As the webmethods of theS e r v i c e 1

    class are to be accessed through a webserver, we must also provide a WWW

    page that (a) indicates that a Web Service is available and (b) gives the location of the file containing the code.

    If you are using the wizard of Visual Studio.NET, this is the second file that is automatically generated for you.

    It will create the WWW page in a file with a. a s m x

    extension. For example, the fileS e r v i c e 1 . a s m x

    could

    contain:

    0068:

    As you can see, this WWW page does not contain HTML instructions. Instead, it is just providing a directive tothe webserver telling it that there is a Web Service in C# in the file

    S e r v i c e 1 . a s m x . c s

    and that it is provided by

    the classS e r v e r C o n v e r t . S e r v i c e 1

    .

    3.3 Waiting for requests to come in

    So, assuming that IIS is running on w w w . a . c o m , the Web Service is now available at a URL like:

    0070: http://www.a.com/wsud/cs/ServerConvert/Service1.asmx

    3.4 Testing the Web Service

    An easy way of testing a .NET Web Service is to use a browser to go to a URL like the one given above. A WWW

    page containing a list of the methods offered by the Web Service will be dynamically generated. You can then click

    on the name of the method you want to be executed. Another WWW page will be dynamically generated. It will

    contain a web form that has textboxes for the methods arguments and a submit button that is labelled INVOKE.

    When the button is clicked, an appropriate HTTP request is sent to the Web Services webserver. The appropriate

    method will then be executed, and the webserver will send a reply back to the browser.

    Instead of sending back HTML, the body of the reply is usually coded in a simple XML language. For example:

    0071: 0072: 0073: 320074:

    What the browser does when it receives this XML document depends on the browser being used. Some browsers

    will display the XML nicely in the pane of the browsers window; others will ask you what you want to do with

    the XML; or you may get a blank screen and you have to click on View Source Code to see the XML.

    4 Writing .NET programs to access a Web Service

    4.1 Introduction

    We now look at how we can provide a .NET program that accesses a Web Service. Note: elsewhere, accessing a

    Web Service is called consuming a Web Service.

    Suppose a program running on an external site wants to call theT o F a h r e n h e i t

    method provided by the Web

    Service that was given earlier. What we can do is to get the code of the program to generate an HTTP request,

    send it to the webserver providing the Web Service, and then decode the reply that gets sent back.

    Once again, there are tools in the .NET Framework that help us to do this.

    4.2 Using a wizard/tool to generate a proxy class

    For example, Visual Studio.NET has a wizard that automatically generates the code of a class that looks similar

    to the class of the Web Service. This class is called a proxy class. When you use the wizard, you have to supply

    it with the URL of the Web Service. It then goes away to the appropriate webserver to query the Web Service to

    discover the methods that the Web Service is providing together with their parameters and return types. For each

    method of the Web Service that has a WebMethod attribute, the wizard will generate the code of a method that has

    the same parameters and the same return type.

    4

  • 7/29/2019 Webservies on .Net

    5/20

    So if you want to call a method of the Web Service, you instead call the method of the proxy class that has the

    same name. Behind the scenes, the call of the method of the proxy class creates the HTTP request; sends it to the

    webserver providing the Web Service; waits for the reply; and then decodes the reply that is returned by the Web

    Service.

    If you have not got Visual Studio.NET, you can instead generate a proxy class with a tool (called w s d l . e x e ) that

    is part of the .NET Framework (which is free). This tool lives in the directory:

    C:\Program Files\Microsoft.NET\FrameworkSDK\Bin

    4.3 Writing a program that uses the proxy class

    When we are providing a client of a Web Service, all we have to do is to create an instance of the proxy class that

    the wizard/tool has generated, and then apply the appropriate method to that object:

    0087: Service1 tService1 = new Service1();0088: double tFahrenheit = tService1.ToFahrenheit(tCentigrade);

    4.4 Providing a console application that calls T o F a h r e n h e i t

    So, here is a console application that calls the T o F a h r e n h e i t method:

    0075: using Console = System.Console;0076: using Service1 = ConsoleConvert.Proxy.Service1;0077: namespace ConsoleConvert0078: {

    0079: public class Class10080: {0081: public static void Main()0082: {0083: Console.Write("Type in a Centigrade value: ");0084: string tCentigradeString = Console.ReadLine();0085: double tCentigrade = double.Parse(tCentigradeString);0086: Console.WriteLine("Centigrade value is: " + tCentigrade);0087: Service1 tService1 = new Service1();0088: double tFahrenheit = tService1.ToFahrenheit(tCentigrade);0089: Console.WriteLine("Fahrenheit value is: " + tFahrenheit);0090: }0091: }0092: }

    4.5 Looking at the code of a method of the proxy class

    As mentioned above, the wizard/tool automatically generates the code of a class that has similar methods. So if

    we gave it the URL of the Web Service that is providing the T o F a h r e n h e i t method it would generate code like:

    0093: namespace ConsoleConvert.Proxy0094: {0095: public class Service1 : System.Web.Services.Protocols.SoapHttpClientProtocol0096: {0097: ...0098: public double ToFahrenheit(double pCentigrade)0099: {0100: object[] results = this.Invoke("ToFahrenheit", new object[]{pCentigrade});0101: return (double) results[0];0102: }0103: ...0104: }

    0105: }

    When the T o F a h r e n h e i t method of the proxy class is called, its call of I n v o k e sends the appropriate HTTP

    request to the Web Services site and decodes the reply that is returned. Then, an appropriate value is returned to

    the caller of theT o F a h r e n h e i t

    method.

    5

  • 7/29/2019 Webservies on .Net

    6/20

    4.6 The full code of the proxy class

    Here is the full code of the proxy class that was generated by Visual Studio.NET:

    0106: //------------------------------------------------------------------------------0107: // 0108: // This code was generated by a tool.0109: // Runtime Version: 1.1.4322.5730110: //0111: // Changes to this file may cause incorrect behavior and will be lost if0112: // the code is regenerated.0113: // 0114: //------------------------------------------------------------------------------0115:

    0116: //0117: // This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.573.0118: //0119: namespace ConsoleConvert.Proxy {0120: using System.Diagnostics;0121: using System.Xml.Serialization;0122: using System;0123: using System.Web.Services.Protocols;0124: using System.ComponentModel;0125: using System.Web.Services;0126:0127: /// 0128: [System.Diagnostics.DebuggerStepThroughAttribute()]0129: [System.ComponentModel.DesignerCategoryAttribute("code")]0130: [System.Web.Services.WebServiceBindingAttribute(Name="Service1Soap",0131: Namespace="http://www.a.com/webservices/")]0132: public class Service1 : System.Web.Services.Protocols.SoapHttpClientProtocol {

    0133:0134: /// 0135: public Service1() {0136: this.Url =0137: "http://www.a.com/wsud/cs/ServerConvert/Service1.asmx";0138: }0139:0140: /// 0141: [System.Web.Services.Protocols.SoapDocumentMethodAttribute0142: ("http://www.a.com/webservices/ToFahrenheit",0143: RequestNamespace="http://www.a.com/webservices/",0144: ResponseNamespace="http://www.a.com/webservices/",0145: Use=System.Web.Services.Description.SoapBindingUse.Literal,0146: ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]0147: public System.Double ToFahrenheit(System.Double pCentigrade) {0148: object[] results = this.Invoke("ToFahrenheit", new object[] {0149: pCentigrade});

    0150: return ((System.Double)(results[0]));0151: }0152:0153: /// 0154: public System.IAsyncResult BeginToFahrenheit(System.Double pCentigrade,0155: System.AsyncCallback callback, object asyncState) {0156: return this.BeginInvoke("ToFahrenheit", new object[] {0157: pCentigrade}, callback, asyncState);0158: }0159:0160: /// 0161: public System.Double EndToFahrenheit(System.IAsyncResult asyncResult) {0162: object[] results = this.EndInvoke(asyncResult);0163: return ((System.Double)(results[0]));0164: }0165: }0166: }

    4.7 Asynchronous calls

    You will see that the proxy class provides two other methods besidesT o F a h r e n h e i t

    . If a client uses the proxy

    classsT o F a h r e n h e i t

    method, it will sit there waiting for the Web Services webserver to reply. If, instead,

    the client uses theB e g i n T o F a h r e n h e i t

    method of the proxy class, the call ofB e g i n T o F a h r e n h e i t

    will return

    almost immediately. In the client, the call ofB e g i n T o F a h r e n h e i t

    has to supply (in an argument) the method

    that it wants to be called when the webserver delivers its reply. That method will need to call E n d T o F a h r e n h e i t

    to get the result of the call of T o F a h r e n h e i t .

    6

  • 7/29/2019 Webservies on .Net

    7/20

    5 Communicating with a .NET Web Service

    5.1 HTTP GET and HTTP POST requests

    When an external site wishes to call a method of a Web Service, it needs to indicate to the Web Service the name

    of the method to call and the arguments to be passed to the method. And the external site is expecting the Web

    Service to return a value. This communication is done by sending an HTTP request to the webserver of the Web

    Services site.

    Most of the billions of queries sent every day through the WWW are HTTP GET requests. For example, when

    you type the following URL into the location box of a browser:

    0167: http://www.a.com/pictures/index.htm

    the browser will contact port 80 of w w w . a . c o m and send the following lines to it:

    0168: GET /pictures/index.htm HTTP/1.10169: Host: www.a.com0170: Content-Type: text/html0171:

    w w w . a . c o m will return lines like the following to the browser:

    0172: HTTP/1.1 200 OK0173: Date: Mon, 29 Mar 2004 14:40:58 GMT0174: Server: Apache/1.3.27 (Unix) PHP/4.3.2 mod_ssl/2.8.12 OpenSSL/0.9.6g0175: Last-Modified: Mon, 29 Mar 2004 14:37:27 GMT

    0176: Accept-Ranges: bytes0177: Content-Type: text/html; charset=iso-8859-10178: Content-Length: 310179:0180: 0181:

    0182: hello world!0183:

    0184:

    Although most WWW pages are produced by means of an HTTP GET request, some WWW pages are the result

    of an HTTP POST request. HTTP POST requests often occur when you click on the submitbutton of a web form.

    For example, suppose a WWW page provides the following web form:

    0185:

    0186: 0187: 0188: 0189:

  • 7/29/2019 Webservies on .Net

    8/20

    5.3 Communicating with a Web Service using HTTP POST and SOAP

    Although the first two mechanisms can deal with simple cases, they are inadequate for describing more

    complicated arguments. To cater for more complex cases, a Web Service normally allows itself to be contacted by

    an HTTP POST request where the body of the request is in XML coded using SOAP.

    An example is:

    0197: POST /wsud/cs/ServerConvert/Service1.asmx HTTP/1.10198: Host: www.a.com0199: Content-Type: text/xml; charset=utf-80200: Content-Length: XXXX0201: SOAPAction: "http://www.a.com/webservices/ToFahrenheit"

    0202:0203: 0204: 0208: 0209: 0210: 00211: 0212: 0213:

    Hiding in all this detail is the fact that we want to contact a webserver on w w w . a . c o m to visit the page

    at / w s u d / c s / S e r v e r C o n v e r t / S e r v i c e 1 . a s m x to execute the T o F a h r e n h e i t method with an argument

    (p C e n t i g r a d e

    ) of0

    .

    The reply from the webserver (after the appropriate method has been executed) is likely to be XML coded using

    SOAP. An example is:

    0214: HTTP/1.1 200 OK0215: Content-Type: text/xml; charset=utf-80216: Content-Length: YYYY0217:0218: 0219: 0223: 0224: 0225: 32

    0226: 0227: 0228:

    Hidden away in all this XML is the fact that the result of the call of the method is the value 32.

    5.4 Dont panic

    Although the webserver handling a request receives the request coded in some way (e.g., using one of the above

    three mechanisms), when providing a Web Service we do not have to provide any code to decode this HTTP

    request. For example, we do not have to parse the XML if the third mechanism is being used.

    Similarly, we do not need to generate the XML of the reply.

    So, when we are providing a Web Service, we need not be concerned about this: all the hard work of decoding the

    request and encoding the reply is done elsewhere for us.Similarly, when we are providing a client of a Web Service, we do not have to write code that generates the HTTP

    request with a body coded in SOAP and we do not have to write the code to parse the XML that gets returned by

    the Web Service: instead, all of that is done by the call ofI n v o k e

    that appears in the body of each method of the

    proxy class, e.g.:

    0100: object[] results = this.Invoke("ToFahrenheit", new object[]{pCentigrade});

    8

  • 7/29/2019 Webservies on .Net

    9/20

    6 Monitoring the HTTP traffic

    The .NET Framework is not the only way of providing a Web Service or accessing a Web Service. There are

    many other products that can be used. The Apache Software Foundation provide a product called Axis, and we

    will look at how this can be used later. Included with Axis is a program called t c p m o n that can be used to monitor

    the HTTP traffic that we are generating.

    So, instead of the client program (e.g.,C o n s o l e C o n v e r t

    ) contacting the Web Service directly, we can arrange

    for it to go through the t c p m o n program. So the client program contacts t c p m o n and t c p m o n contacts the Web

    Service.

    In order to runt c p m o n

    , we need to make a change to the code of the proxy class. InS e r v i c e 1

    s constructor,

    change:

    0136: this.Url =0137: "http://www.a.com/wsud/cs/ServerConvert/Service1.asmx";

    to:

    0229: this.Url =0230: "http://localhost:8080/wsud/cs/ServerConvert/Service1.asmx";

    where 8080 is an arbitrarily chosen port. Then compile theC o n s o l e C o n v e r t

    program again, in order to get it to

    use this new version of the proxy class. Now, when you want to runC o n s o l e C l i e n t

    , you first need to ensure that

    t c p m o n

    is running. Ast c p m o n

    is a part of Axis, it requires a classpath to be set up before it can be started. This

    can be done using commands like the following in a Command Prompt window:

    0231: set AXIS_HOME=E:\axis-1_1RC20232: set CLASSPATH=.0233: set CLASSPATH=%AXIS_HOME%\lib\axis.jar;%CLASSPATH%0234: set CLASSPATH=%AXIS_HOME%\lib\commons-discovery.jar;%CLASSPATH%0235: set CLASSPATH=%AXIS_HOME%\lib\commons-logging.jar;%CLASSPATH%0236: set CLASSPATH=%AXIS_HOME%\lib\jaxrpc.jar;%CLASSPATH%0237: set CLASSPATH=%AXIS_HOME%\lib\saaj.jar;%CLASSPATH%0238: set CLASSPATH=%AXIS_HOME%\lib\log4j-1.2.4.jar;%CLASSPATH%0239: set CLASSPATH=%AXIS_HOME%\lib\wsdl4j.jar;%CLASSPATH%

    As you can see, it is a long classpath. The t c p m o n program can then be started using the command:

    0240: java org.apache.axis.utils.tcpmon 8080 www.a.com 80

    After thet c p m o n

    window appears, run theC o n s o l e C o n v e r t

    program in the usual way. Thet c p m o n

    window

    should show you the HTTP request that goes tow w w . a . c o m

    and the HTTP response that comes back from that

    site.

    7 Providing more than just the basics

    Of course, writing a program in terms of a Web Service means that the program is dependent on a connection to

    the Internet, the availability of the computer and the webserver of the Web Service, whether the Web Service still

    maintains the same contract as when the program was written, ... . Although the facilities described so far enable

    us to provide and access Web Services, it only establishes the basics: a lot more has to be done if Web Services

    are to be used to provide a reliable software service.

    Various companies have been working on producing specifications for a number of areas that build on the basics

    of Web Services. These include:

    Security: WS-Security, WS-Trust, WS-SecureConversation, WS-Federation

    Reliable Messaging: WS-ReliableMessaging

    Transactions: WS-Coordination, WS-AtomicTransaction, WS-BusinessActivity

    These specifications are examined by the papers at [9, 11]. Other papers that look at the bigger picture include

    those at [10, 16, 29].

    In the next section of this document, we just consider the first of these: WS-Security.

    9

  • 7/29/2019 Webservies on .Net

    10/20

    8 Adding security to a Web Service

    8.1 More about WS-Security

    Although you could useh t t p s

    instead ofh t t p

    to ensure SOAP messages are encrypted when they pass from A

    to B, this is regarded as inadequate. One of the problems with usingh t t p s

    is that if B decides to send the SOAP

    message to some other machine C, A has no control over whetherh t t p s

    gets used by B. So, can we do something

    different about security without usingh t t p s

    ?

    IBM, Microsoft and Verisign have released a specification called WS-Security [12, 22, 37] that provides a

    number of ways in which SOAP messages can be transferred securely.

    For example, you can:

    arrange for the SOAP message to include in its header a username and a password, and the server rejects

    unrecognised usernames and passwords;

    arrange for the SOAP message to include in its header a digital signature formed from its body using the

    senders private key;

    arrange for the body of the SOAP message to be encrypted.

    In this document, we will only look at the first of these: providing a username and a password.

    The WS-Security specification provides three ways in which a username/password can be communicated in a

    U s e r n a m e T o k e n

    element of the header of a SOAP message:

    only a username is provided;

    both a username and a password are provided in plain text;

    the password is encrypted.

    In this document, we will only be looking at this last possibility.

    However, even if the password is encrypted, an evil intermediary could [capture the information in a SOAP header

    and later] send the hashed password and then could be authenticated as the original sender [27].

    So in a later proposal (called the WS-Security Addendum [13]), instead of sending just a hash of the password,

    the addendum specifies that a digest version of the password should be sent [containing] a combination of the

    password, a Nonce (functionally a unique string that identifies this request), and the creation time [27]. A server

    could use the Nonce and the timestamp values to ensure that replays do not take place.

    8.2 Web Services Enhancements (WSE)

    In December 2002, Microsoft released the Web Services Enhancements (WSE) [23, 25, 26, 27, 28, 29]. This

    includes an implementation of the WS-Security specification (and its Addendum).

    In order to use the WSE, you will need to download it and install it. The latest version is available from [24].

    8.3 Modifying a server to check a username and a password

    We now suppose that the WSE has been downloaded and installed, and that we wish to alter the server and the

    client of a Web Service so that they use a username and a password for authentication.

    On the server, the checking of the username and the password of any U s e r n a m e T o k e n elements of the header of a

    SOAP message is done by a method calledA u t h e n t i c a t e T o k e n

    . By default, theA u t h e n t i c a t e T o k e n

    methodprovided by the

    U s e r n a m e T o k e n M a n a g e r

    class checks the username of theU s e r n a m e T o k e n

    element against

    those known to Microsoft Windows and returns the associated password. However, a Web Service can derive

    a class from theU s e r n a m e T o k e n M a n a g e r

    class and override theA u t h e n t i c a t e T o k e n

    method. This method

    can either have the information about valid usernames and passwords embedded in its code or it can check the

    information in some external source such as a database. The method should return the password associated with

    the username.

    10

  • 7/29/2019 Webservies on .Net

    11/20

    Here is an example where the valid usernames and passwords are embedded:

    0241: public class MyUsernameTokenManager : UsernameTokenManager0242: {0243: protected override string AuthenticateToken(0244: UsernameToken pUsernameToken)0245: {0246: switch(pUsernameToken.Username)0247: {0248: case "superman":0249: return "mansuper";0250: default:0251: throw new SoapException("Unrecognised username",0252: SoapException.ClientFaultCode);0253: }0254: }0255: }

    Because the s w i t c h has one c a s e , only the username s u p e r m a n and the password m a n s u p e r will be accepted.

    In the following text, it will be assumed that this code appears as part of a namespace calledS e r v e r U s e r n a m e

    .

    In order to use the WSE, you will need to make some changes to the w e b . c o n f i g file that is used by the Web

    Service. This file is stored in the same directory as the other files of the project (e.g., S e r v i c e . a s m x . c s ).

    It contains an XML document. You will need to add the following to itsc o n f i g u r a t i o n

    element:

    0256: 0257: 0262: 0263: 0264: 0265: 0269: 0270:

    and the following needs to be added to thes y s t e m . w e b

    element:

    0271:

    0272: 0273: 0279: 0280:

    Note: the text of each of the two t y p e elements given above needs to be typed on one line: above, they are

    presented on several lines in order to help you read them.

    One of the changes to thew e b . c o n f i g

    file arranges for it to include as e c u r i t y T o k e n M a n a g e r

    element.

    The contents of this element ensure thatS e r v e r U s e r n a m e . M y U s e r n a m e T o k e n M a n a g e r

    sA u t h e n t i c a t e T o k e n

    method gets used.

    Now, whenever the Web Service is contacted, automatically behind the scenes, the WSE SOAP Extension will

    authenticate the usernames/passwords of anyU s e r n a m e T o k e n

    elements of the header of the SOAP message.

    11

  • 7/29/2019 Webservies on .Net

    12/20

    But we have to ensure that an incoming SOAP message actually has one U s e r n a m e T o k e n element. In the

    following code for a Web Service providing a T o F a h r e n h e i t method, this is done by a subsidiary method called

    i G e t U s e r n a m e T o k e n

    :

    0281: using PasswordOption = Microsoft.Web.Services.Security.PasswordOption;0282: using RequestSoapContext = Microsoft.Web.Services.RequestSoapContext;0283: using SecurityToken = Microsoft.Web.Services.Security.SecurityToken;0284: using SoapContext = Microsoft.Web.Services.SoapContext;0285: using SoapException = System.Web.Services.Protocols.SoapException;0286: using UsernameToken = Microsoft.Web.Services.Security.UsernameToken;0287: using UsernameTokenManager = Microsoft.Web.Services.Security.Tokens.UsernameTokenManager;0288: using System;0289: using System.Collections;

    0290: using System.ComponentModel;0291: using System.Data;0292: using System.Diagnostics;0293: using System.Web;0294: using System.Web.Services;0295: namespace ServerUsername0296: {0297: [WebService(Namespace="http://www.a.com/webservices/",0298: Description="This Web Service provides temperature conversion services.")]0299: public class Service1 : System.Web.Services.WebService0300: {0301: ... >0302: [WebMethod(Description="This converts from Centigrade to Fahrenheit.")]0303: public double ToFahrenheit(double pCentigrade)0304: {0305: UsernameToken tUsernameToken = iGetUsernameToken();0306: return 32 + pCentigrade*9/5;

    0307: }0308: private static UsernameToken iGetUsernameToken()0309: {0310: SoapContext tSoapContext = RequestSoapContext.Current;0311: if (tSoapContext==null)0312: {0313: throw new Exception("Only SOAP requests are permitted");0314: }0315: if (tSoapContext.Security.Tokens.Count!=1)0316: {0317: throw new SoapException("There must be one security token",0318: SoapException.ClientFaultCode);0319: }0320: foreach (SecurityToken tSecurityToken in tSoapContext.Security.Tokens)0321: {0322: if (tSecurityToken is UsernameToken)0323: {

    0324: UsernameToken tUsernameToken = (UsernameToken)tSecurityToken;0325: if (tUsernameToken.PasswordOption==PasswordOption.SendHashed)0326: {0327: return tUsernameToken;0328: }0329: else0330: {0331: throw new SoapException("The PasswordOption has the wrong value",0332: SoapException.ClientFaultCode);0333: }0334: }0335: else0336: {0337: throw new SoapException("A UsernameToken was expected",0338: SoapException.ClientFaultCode);0339: }0340: }

    0341: throw new SoapException("A SecurityToken has not been found",0342: SoapException.ClientFaultCode);0343: }0344: }0345: ... >0346: }

    You will see that this code uses some types from the M i c r o s o f t . W e b . S e r v i c e s namespace (and from some of

    its subnamespaces). These namespaces are a part of the WSE. In order to get Visual Studio.NET to find these

    types, you will need to go to the Add Reference option of its Project menu, and then use this option to add a

    reference toM i c r o s o f t . W e b . S e r v i c e s . d l l

    . This file is one of those that will have been created by installing

    the WSE.

    12

  • 7/29/2019 Webservies on .Net

    13/20

    Although the above code is checking that there is a U s e r n a m e T o k e n element, it does not prevent replay attacks:

    it is being lazy in that it does not include code to check the Nonce ( t U s e r n a m e T o k e n . N o n c e ) and the timestamp

    value (t U s e r n a m e T o k e n . C r e a t e d

    ) of the incoming SOAP message.

    8.4 Getting a client to present a username and a password

    We also have to alter the client so that it arranges for a username and a password to be present in the header of the

    SOAP message that it generates.

    Currently, the proxy class (S e r v i c e 1

    ) is derived from the class:

    System.Web.Services.Protocols.SoapHttpClientProtocol

    S e r v i c e 1 needs to be altered so that it is derived from the class:

    Microsoft.Web.Services.WebServicesClientProtocol

    The latter class is itself derived from:

    System.Web.Services.Protocols.SoapHttpClientProtocol

    and soS e r v i c e 1

    can be used as before but it now has access to the other facilities that are in its new base class:

    these facilities are there to support WS-Security.

    We can then add the username and the password to the header of the SOAP message by applying the appropriate

    method to theS e r v i c e 1

    object:

    0347: using Console = System.Console;0348: using Exception = System.Exception;0349: using PasswordOption = Microsoft.Web.Services.Security.PasswordOption;0350: using Service1 = ConsoleUsername.Proxy.Service1;0351: using UsernameToken = Microsoft.Web.Services.Security.UsernameToken;0352: namespace ConsoleUsername0353: {0354: public class Class10355: {0356: public static void Main()0357: {0358: Console.Write("Type in a Centigrade value: ");0359: string tCentigradeString = Console.ReadLine();0360: double tCentigrade = double.Parse(tCentigradeString);0361: Console.WriteLine("Centigrade value is: " + tCentigrade);

    0362: Console.Write("Type in a Username: ");0363: string tUsername = Console.ReadLine();0364: Console.WriteLine("Username is: " + tUsername);0365: Console.Write("Type in a Password: ");0366: string tPassword = Console.ReadLine();0367: Console.WriteLine("Password is: " + tPassword);0368: UsernameToken tUsernameToken =0369: new UsernameToken(tUsername, tPassword, PasswordOption.SendHashed);0370: Service1 tService1 = new Service1();0371: tService1.RequestSoapContext.Security.Tokens.Add(tUsernameToken);0372: try0373: {0374: double tFahrenheit = tService1.ToFahrenheit(tCentigrade);0375: Console.WriteLine("Fahrenheit value is: " + tFahrenheit);0376: }0377: catch(Exception pException)0378: {

    0379: Console.WriteLine(pException.Message);0380: }0381: }0382: }0383: }

    Once again, the above code uses types from a subnamespace of theM i c r o s o f t . W e b . S e r v i c e s

    namespace. As

    before, in order to get Visual Studio.NET to find these types, you will need to go to the Add Reference option of

    its Projectmenu, and then use this to add a reference to M i c r o s o f t . W e b . S e r v i c e s . d l l .

    13

  • 7/29/2019 Webservies on .Net

    14/20

    9 Using a language other than C#

    Although all the above code is given in C#, the wizards of Visual Studio.NET generate code in any language

    supported by Visual Studio.NET. So, for example, we could get it to generate a Web Service written in Visual

    Basic.NET and use that from a proxy class whose code is provided in C#, or vice-versa. Or, if we are using a

    Web Service that is provided by someone else, we may not know whether the Web Service is written in the same

    language as our proxy class.

    10 Describing a Web Service using WSDL

    If a site provides a Web Service, it needs to provide some means for an external site to find out the details of the

    Web Service, i.e., what methods are provided and how they are called.

    For example, earlier we saw that, when we use the wizard of Visual Studio.NET that generates a proxy class,

    we supply the wizard with the URL of a Web Service. Now, the information it gets back from the Web Service

    describes the services being offered.

    These facilities are described using the notation of an XML language called WSDL (Web Services Description

    Language).

    A complete WSDL file is given below. Here is an explanation of some parts of the file:

    1. Thes e r v i c e

    element of a WSDL file gives basic information about the Web Service such as the location

    of the. a s m x

    file and details about which ports (HTTP GET, HTTP POST and/or SOAP) are supported.

    2. There is ab i n d i n g

    element for each of the ports. A binding element describes for each method (provided

    by the Web Service) the way in which a request is coded and the way in which the reply is coded. So it

    might say the request is in SOAP and the reply is in SOAP. Or it might say the request is url-encoded and

    the reply is given using some XML coding.

    3. There are twom e s s a g e

    elements for each of the ports. One of the message elements is used to give the name

    and the type of each parameter, and the other message element is used to describe the type of the result. So

    an In message element might say that there is one parameter called p C e n t i g r a d e that is a d o u b l e and the

    corresponding Outmessage element might say that a d o u b l e is returned.

    A fuller description of the purpose of the various parts of a WSDL file is provided by [21].

    Here is a WSDL file that could be used to describe the Web Service being offered byS e r v i c e 1 . a s m x

    :

    0384: 0385: 0395: 0396: 0399: 0400: 0401: 0402: 0404: 0405: 0406: 0407: 0408: 0409: 0410: 0412: 0413: 0414: 0415: 0416: 0417: 0418: 0419: 0420: 0421: 0422: 0423: 0424:

    14

  • 7/29/2019 Webservies on .Net

    15/20

    0425: This converts from Centigrade to Fahrenheit.0426: 0427: 0428: 0429: 0430: 0431: 0433: 0434: 0437: 0438:

    0439: 0440: 0441: 0442: 0443: 0444: 0445: 0446: This Web Service provides temperature conversion0447: services.0448: 0449: 0451: 0452: 0453:

    Although the .NET Framework provides a tool (calledd i s c o . e x e

    ) that can be used to generate a WSDL file,usually when using the .NET Framework you instead supply a URL to the webserver (hosting the Web Service)

    that causes the WSDL to be generated automatically. You do this by appending ? w s d l to the URL for a . a s m x

    file:

    0454: http://www.a.com/wsud/cs/ServerConvert/Service1.asmx?wsdl

    11 Other products for Web Services

    11.1 Introduction

    As mentioned earlier, the .NET Framework is not the only way of providing a Web Service or accessing a Web

    Service. There are many other products that can be used. Here are two examples:

    Sun provide JAX-RPC. This is included in Suns Java Web Services Development Pack [34].

    Apache have two products: there is Apache SOAP and a newer product called Axis [1, 3].

    I have successfully installed each of the above products; used them to create Web Services; and used them to

    access Web Services. I have also successfully interoperated between the above products and .NET.

    The next section of this document looks at how Axis can be used to access the .NET Web Service that was

    developed earlier in this document.

    11.2 Accessing a Web Service from an Apache SOAP client

    I have written a document entitled Web Services using Axis that goes in great detail about using Axis to create

    Web Services and access Web Services. It is available at [3].

    Here, we will only look at using the client side of Axis. The instructions that follow are paraphrased from the Axis

    Users Guide [1].

    Earlier, details were given of how to obtain the WSDL description of a Web Service. Suppose the WSDL for the

    Web Service offering theT o F a h r e n h e i t

    method has been stored in the fileS e r v i c e 1 . w s d l

    .

    15

  • 7/29/2019 Webservies on .Net

    16/20

    Having downloaded and installed Axis, a proxy class for this Web Service can be created using the command:

    0455: java org.apache.axis.wsdl.WSDL2Java Service1.wsdl

    AsW S D L 2 J a v a

    is a program that comes with Axis, in order to execute the above command you will need to set up

    the long classpath that was given in Section 6 of this document.

    The WSDL2Java program looks at the WSDL document to discover things about the Web Service. It then

    generates a proxy class.

    If, having executed the aboveW S D L 2 J a v a

    command, you then execute the command:

    dir com\a\www\webservices

    you will see that the WSDL2Java program has created the files:

    Service1.javaService1Locator.javaService1Soap.javaService1SoapStub.java

    The fileS e r v i c e 1 S o a p S t u b . j a v a

    contains the proxy class; the other files are supporting files.

    The interfaceS e r v i c e 1

    declares headers forg e t

    methods for each port that is listed in thes e r v i c e

    element of

    the WSDL document. In our example, it declares a header for a method calledg e t S e r v i c e 1 S o a p

    . The class

    S e r v i c e 1 L o c a t o r

    is an implementation of this interface, and so it implements theg e t S e r v i c e 1 S o a p

    method.

    This method returns an instance of the proxy classS e r v i c e 1 S o a p S t u b

    . This class implements the interfaceS e r v i c e 1 S o a p : this interface just declares headers for each method that is provided by the Web Service. In our

    example, it just provides the header of the t o F a h r e n h e i t method.

    These interfaces and classes are used in the following Java program:

    0456: import java.rmi. RemoteException; // ConsoleClient.java0457: import javax.xml.rpc. ServiceException;0458: import com.a.www.webservices. Service1;0459: import com.a.www.webservices. Service1Soap;0460: import com.a.www.webservices. Service1Locator;0461: public class ConsoleClient0462: {0463: public static void main(String[] pArgs)0464: throws RemoteException, ServiceException0465: {

    0466: double tCentigrade = Double.parseDouble(pArgs[0]);0467: System.out.println("Centigrade: " + tCentigrade);0468: Service1 tService1 = new Service1Locator();0469: Service1Soap tService1Soap = tService1.getService1Soap();0470: double tFahrenheit = tService1Soap.toFahrenheit(tCentigrade);0471: System.out.println("Fahrenheit: " + tFahrenheit);0472: }0473: }

    This program expects a Centigrade value as an argument on thej a v a

    command line:

    0474: javac ConsoleClient.java0475: java ConsoleClient 0.0

    The g e t S e r v i c e 1 S o a p method creates an instance of the proxy class S e r v i c e 1 S o a p S t u b . Having created the

    object, the program applies the t o F a h r e n h e i t method to the object:

    0470: double tFahrenheit = tService1Soap.toFahrenheit(tCentigrade);

    As with proxy classes in .NET, when a method of an Axis proxy class is called, the code of the method sends the

    appropriate SOAP request to the Web Service; decodes the XML that is returned by the Web Service; and returns

    an appropriate value to the caller of the method.

    12 Using Web Services provided by other sites

    12.1 Accessing the Web Service provided by Amazon

    12.1.1 Accessing and using Amazons WSDL document

    Amazon provide a number of web sites around the world (including w w w . a m a z o n . c o . u k ). Many of these Amazonsites provide a Web Service.

    16

  • 7/29/2019 Webservies on .Net

    17/20

    There is information about Amazon Web Services at:

    http://www.amazon.com/webservices/

    The WSDL document for accessing the Web Service provided by the Amazon sites in UK and Germany is located

    at:

    http://soap-eu.amazon.com/schemas3/AmazonWebServices.wsdl

    and the WSDL document for the Amazon Web Services at its USA and Japan sites is located at:

    http://soap.amazon.com/schemas3/AmazonWebServices.wsdl

    12.1.2 Providing a console application that is a client of Amazons Web Services

    We can use one of the above WSDL documents to generate a proxy class for accessing the information stored at

    an Amazon site. You will get a proxy class calledA m a z o n S e a r c h S e r v i c e

    together with a number of supporting

    classes such asA s i n R e q u e s t

    . The latter is used to generate a search for a particular product.

    The following console application accesses the information stored at thew w w . a m a z o n . c o . u k

    site. An affliate

    of Amazons site should set thet a g

    field (of anA s i n R e q u e s t

    object) to their affliate name. If you are not an

    Amazon affliate, you should set this field to" w e b s e r v i c e s - 2 0 "

    . Whether or not you are an affliate, you still

    have to register with Amazon to use their Web Service. In the following code, my registration id has been replaced

    by " X X X X X X X X X X X X X X " . Besides using the WSDL document that is appropriate for the particular Amazon site

    you wish to access, it is also necessary to set thel o c a l e

    field. In the following code, this field is set tou k

    . If your

    query only requires access to a small number of the available fields, you can set thet y p e

    field to" l i t e "

    : if

    instead you want all of the values, set this field to" h e a v y "

    .

    It seems it is part of the design of Amazons Web Service to return n u l l if a value is not available in time: it seems

    that their view is that it is better to be fast in providing some of the information rather than hanging around for all

    of it to become available.

    0476: using AmazonSearchService = ConsoleAmazon.Proxy.AmazonSearchService;0477: using AsinRequest = ConsoleAmazon.Proxy.AsinRequest;0478: using Console = System.Console;0479: using Details = ConsoleAmazon.Proxy.Details;0480: using ProductInfo = ConsoleAmazon.Proxy.ProductInfo;0481: namespace ConsoleAmazon0482: {0483: public class Class1

    0484: {0485: public static void Main()0486: {0487: Console.Write("Type in an ISBN: ");0488: string tIsbnString = Console.ReadLine();0489: AmazonSearchService tAmazonSearchService =0490: new AmazonSearchService();0491: AsinRequest tAsinRequest = new AsinRequest();0492: tAsinRequest.tag = "webservices-20";0493: tAsinRequest.devtag = "XXXXXXXXXXXXXX";0494: tAsinRequest.asin = tIsbnString;0495: tAsinRequest.locale = "uk";0496: tAsinRequest.type = "heavy";0497: ProductInfo tProductInfo =0498: tAmazonSearchService.AsinSearchRequest(tAsinRequest);0499: Details[] tDetailsArray = tProductInfo.Details;0500: Details tDetails = tDetailsArray[0];

    0501: Console.WriteLine(tDetails.ProductName);0502: Console.WriteLine(tDetails.ReleaseDate);0503: Console.WriteLine(tDetails.OurPrice);0504: Console.WriteLine(tDetails.ListPrice);0505: Console.WriteLine(tDetails.UsedPrice);0506: Console.WriteLine(tDetails.SalesRank);0507: Console.WriteLine(tDetails.Availability);0508: Console.WriteLine(tDetails.ImageUrlSmall);0509: Console.WriteLine(tDetails.ImageUrlMedium);0510: Console.WriteLine(tDetails.ImageUrlLarge);0511: }0512: }0513: }

    17

  • 7/29/2019 Webservies on .Net

    18/20

    12.2 Sites providing Web Services

    One useful site for Web Services isw w w . x m e t h o d s . n e t

    : it gives a list of sites providing Web Services. But this

    list is not ordered in a way that makes it easy to find a Web Service.

    UDDI is an initative that aims to make it easier to locate Web Services. UDDI means Universal Description,

    Discovery and Integration. UDDI is targetted at two kinds of customers: those businesses who want to publish

    what services they offer and those businesses who need to locate a service and access it from some program. More

    details are available at h t t p : / / w w w . u d d i . o r g / .

    If you use a browser to go toh t t p : / / w w w . x m e t h o d s . n e t /

    , you will get a WWW page listing the 30 WWW

    Services that were most recently added to this website. However, half way down this WWW page, there is a

    link labelledF U L L L I S T

    . If you click on this link, you will get the full list of Web Services that are known to

    w w w . x m e t h o d s . n e t .

    Towards the bottom of the full list, there is a Web Service described as:

    Publisher: dpchiesaService Name: ZipToCityStateDescription: Retrieves valid City+State pairs for a given

    US Zip Code, or longitude/latitude for a zipcode.Also retrieves zipcodes for city/state pairs

    Implementation: MS .NET

    If you click on theZ i p T o C i t y S t a t e

    link, thew w w . x m e t h o d s . n e t

    site gives you more details about this Web

    Service. In particular, it says that a WSDL document is available at:

    http://www.winisp.net/cheeso/zips/ZipService.asmx?WSDL

    The above URL ends in. a s m x ? W S D L

    . The. a s m x

    is a sure sign that this Web Service has been implemented using

    Microsofts .NET Framework. As explained earlier, one of the benefits of using .NET for Web Services is that

    WWW pages that can be used to test a Web Service are dynamically generated. You can go to the first of these

    WWW pages by using the above URL without the last 5 characters, i.e., by going to:

    http://www.winisp.net/cheeso/zips/ZipService.asmx

    You should get a WWW page saying:

    0514: The following operations are supported. For a formal definition,0515: please review the Service Description.0516: * ZipToLatLong

    0517: * CityToZip0518: * ZipToCityAndState0519: * CityTo1Zip0520: * ZipTo1CityAndState

    This is a list of the names of the methods provided by the Web Service. If you now click on one of these names,

    e.g., Z i p T o 1 C i t y A n d S t a t e , another WWW page is dynamically generated. It is the WWW page at:

    http://www.winisp.net/cheeso/zips/ZipService.asmx?op=ZipTo1CityAndState

    This WWW page provides a textbox and an Invoke button.

    If you type a zipcode like 9 4 0 4 2 into the textbox and click on the Invoke button, the browser will contact the

    webserver atw w w . w i n i s p . n e t

    to get it to execute theZ i p T o 1 C i t y A n d S t a t e

    method. After a little time, your

    browser will give you the following WWW page:

    0521: 0522: 0523: MOUNTAIN VIEW CA0524:

    You may have to click on View Page Source to see this XML.

    You could use the techniques described in Section 4 of this document to provide a program that accesses this Web

    Service.

    18

  • 7/29/2019 Webservies on .Net

    19/20

    13 References

    1. Apache, Axis Users Guide,

    http://ws.apache.org/axis/

    2. Mike Clark, Peter Fletcher, J. Jeffrey Hanson, Romin Irani, Mark Waterhouse, Jorgen Theli,

    Web Services Business Strategies and Architectures, Expert Press, 2002, 1904284132.

    3. Barry Cornelius, Web Services using Axis,

    http://www.dur.ac.uk/barry.cornelius/papers/web.services.using.axis/

    4. Barry Cornelius, A Taste of C#,

    http://www.dur.ac.uk/barry.cornelius/papers/a.taste.of.csharp/

    5. Barry Cornelius, Comparing .NET with Java,

    http://www.dur.ac.uk/barry.cornelius/papers/comparing.dotnet.with.java/

    6. Ray Djajadinata, Yes, you can secure your Web services documents,

    http://www.javaworld.com/javaworld/jw-08-2002/jw-0823-securexml.html

    http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.html

    7. Chrisina Draganova, Web Services and Java,

    http://www.ics.ltsn.ac.uk/pub/jicc7/draganova2.doc

    8. Gil Hansen, Gil Hansens XML & WebServices URLs,

    http://www.javamug.org/mainpages/XML.html#WebServices

    9. IBM and Microsoft, Federation of Identities in a Web Services World,

    http://msdn.microsoft.com/webservices/understanding/advancedwebservices/default.aspx?pull=/library/en-

    us/dnglobspec/html/ws-federation-strategy.asp

    10. IBM and Microsoft, Reliable Message Delivery in a Web Services World,

    ftp://www6.software.ibm.com/software/developer/library/ws-rm-exec-summary.pdf

    11. IBM, Microsoft and Verisign, Secure, Reliable, Transacted Web Services: Architecture and Composition,

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/wsoverview.asp

    12. IBM, Microsoft and Verisign, Web Services Security (WS-Security),

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security.asp

    13. IBM, Microsoft and Verisign, WS-Security Addendum,http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security-

    addendum.asp

    14. Jonathan Lurie and R. Jason Belanger, The great debate: .Net vs. J2EE,

    http://www.javaworld.com/javaworld/jw-03-2002/jw-0308-j2eenet.html

    15. Anbazhagan Mani and Arun Nagarajan, Understanding quality of service for Web services,

    http://www-106.ibm.com/developerworks/library/ws-quality.html

    16. Joseph Mayo, C# Unleashed,

    SAMS, 2001, 0-672-32122-X.

    17. Klaus Michelsen, C# Primer Plus,

    SAMS, 2001, 0-672-32152-1.

    18. Microsoft, Visual Studio.NET and .NET Framework Reviewers Guide,

    http://download.microsoft.com/download/VisualStudioNET/Utility/7.0/W9X2K/EN-US/frameworkevalguide.doc

    19. Microsoft, Walkthrough: Creating a Web Service Using Visual Basic or C#,

    Help system with Visual Studio.NET.

    20. Microsoft, Walkthrough: Accessing a Web Service Using Visual Basic or C#,

    Help system with Visual Studio.NET.

    21. Microsoft, Web Services Description Language (WSDL) Explained,

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/wsdlexplained.asp

    22. Microsoft (Scott Seely), Understanding WS-Security,

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/understwspol.asp

    23. Microsoft, Web Services Enhancements (WSE),

    http://msdn.microsoft.com/webservices/building/wse/default.aspx

    19

    http://ws.apache.org/axis/http://www.dur.ac.uk/barry.cornelius/papers/web.services.using.axis/http://www.dur.ac.uk/barry.cornelius/papers/a.taste.of.csharp/http://www.dur.ac.uk/barry.cornelius/papers/comparing.dotnet.with.java/http://www.javaworld.com/javaworld/jw-08-2002/jw-0823-securexml.htmlhttp://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.htmlhttp://www.ics.ltsn.ac.uk/pub/jicc7/draganova2.dochttp://www.javamug.org/mainpages/XML.html#WebServiceshttp://msdn.microsoft.com/webservices/understanding/advancedwebservices/default.aspx?pull=/library/en-us/dnglobspec/html/ws-federation-strategy.asphttp://msdn.microsoft.com/webservices/understanding/advancedwebservices/default.aspx?pull=/library/en-us/dnglobspec/html/ws-federation-strategy.aspftp://www6.software.ibm.com/software/developer/library/ws-rm-exec-summary.pdfhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/wsoverview.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security-addendum.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security-addendum.asphttp://www.javaworld.com/javaworld/jw-03-2002/jw-0308-j2eenet.htmlhttp://www-106.ibm.com/developerworks/library/ws-quality.htmlhttp://download.microsoft.com/download/VisualStudioNET/Utility/7.0/W9X2K/EN-US/frameworkevalguide.dochttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/wsdlexplained.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/understwspol.asphttp://msdn.microsoft.com/webservices/building/wse/default.aspxhttp://msdn.microsoft.com/webservices/building/wse/default.aspxhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/understwspol.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/wsdlexplained.asphttp://download.microsoft.com/download/VisualStudioNET/Utility/7.0/W9X2K/EN-US/frameworkevalguide.dochttp://www-106.ibm.com/developerworks/library/ws-quality.htmlhttp://www.javaworld.com/javaworld/jw-03-2002/jw-0308-j2eenet.htmlhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security-addendum.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security-addendum.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/ws-security.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebsrv/html/wsoverview.aspftp://www6.software.ibm.com/software/developer/library/ws-rm-exec-summary.pdfhttp://msdn.microsoft.com/webservices/understanding/advancedwebservices/default.aspx?pull=/library/en-us/dnglobspec/html/ws-federation-strategy.asphttp://msdn.microsoft.com/webservices/understanding/advancedwebservices/default.aspx?pull=/library/en-us/dnglobspec/html/ws-federation-strategy.asphttp://www.javamug.org/mainpages/XML.html#WebServiceshttp://www.ics.ltsn.ac.uk/pub/jicc7/draganova2.dochttp://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.htmlhttp://www.javaworld.com/javaworld/jw-08-2002/jw-0823-securexml.htmlhttp://www.dur.ac.uk/barry.cornelius/papers/comparing.dotnet.with.java/http://www.dur.ac.uk/barry.cornelius/papers/a.taste.of.csharp/http://www.dur.ac.uk/barry.cornelius/papers/web.services.using.axis/http://ws.apache.org/axis/
  • 7/29/2019 Webservies on .Net

    20/20

    24. Microsoft, Web Services Enhancements (WSE) 2.0 Technology Preview,

    http://www.microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-

    FC7AB49B3EDD&displaylang=en

    25. Microsoft (Matt Powell), Programming with Web Services Enhancements 2.0,

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/programwse2.asp

    26. Microsoft (Don Smith), WS-Security Drilldown in Web Services Enhancements 2.0,

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wssecdrill.asp

    27. Microsoft (Matt Powell),

    WS-Security Authentication and Digital Signatures with Web Services Enhancements,http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wssecauthwse.asp

    28. Microsoft (Jeannine Hall Gailey), Encrypting SOAP Messages Using Web Services Enhancements,

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wseencryption.asp

    29. Benjamin Mitchell, .NET Enterprise Web Services: WSE and Indigo,

    http://noops.prismtechnologies.com/talks/50/NOOPSDec11_Edit.ppt

    30. Chris Peiris, Creating a .NET Web Service,

    http://www.15seconds.com/issue/010430.htm

    31. Jeffrey Richter, Applied Microsoft .NET Framework Programming,

    Microsoft Press, 2002, 0-7356-1442-9.

    32. John Sharp and Jon Jagger, Microsoft Visual C# .NET Step by Step,

    Microsoft Press, 2003, 0-7356-1909-3.

    33. Aaron Skonnard, Publishing/Discovering Web Services via DISCO/UDDI,

    http://www.develop.com/conferences/conferencedotnet/materials/W4.pdf

    34. Sun Microsystems, Java Web Services Developer Pack 1.1,

    http://java.sun.com/webservices/webservicespack.html

    35. Thuan Thai and Hoang Q. Lam, .NET Framework Essentials (3rd edition),

    OReilly, 2003, 0-596-00505-9.

    36. Doug Tidwell, James Snell, Pavel Kulchenko, Programming Web Services with SOAP,

    OReilly, 2001, 0-596-00095-2.37. Paul Townend, Web Service Security,

    http://www.dur.ac.uk/p.m.townend/webServiceSecurity.ppt

    38. uddi.org,

    http://www.uddi.org/

    39. Venu Vasudevan, A Web Services Primer,

    http://webservices.xml.com/pub/a/ws/2001/04/04/webservices/

    40. W3C, Simple Object Access Protocol (SOAP),

    http://www.w3.org/2000/xp/Group/

    41. W3C, Web Services Activity,

    http://www.w3.org/2002/ws/

    42. WebServices.org,

    http://www.webservices.org/

    43. XMethods,

    http://www.xmethods.com/

    http://www.microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-FC7AB49B3EDD&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-FC7AB49B3EDD&displaylang=enhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/programwse2.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wssecdrill.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wssecauthwse.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wseencryption.asphttp://noops.prismtechnologies.com/talks/50/NOOPSDec11_Edit.ppthttp://www.15seconds.com/issue/010430.htmhttp://www.develop.com/conferences/conferencedotnet/materials/W4.pdfhttp://java.sun.com/webservices/webservicespack.htmlhttp://www.dur.ac.uk/p.m.townend/webServiceSecurity.ppthttp://www.uddi.org/http://webservices.xml.com/pub/a/ws/2001/04/04/webservices/http://www.w3.org/2000/xp/Group/http://www.w3.org/2002/ws/http://www.webservices.org/http://www.xmethods.com/http://www.xmethods.com/http://www.webservices.org/http://www.w3.org/2002/ws/http://www.w3.org/2000/xp/Group/http://webservices.xml.com/pub/a/ws/2001/04/04/webservices/http://www.uddi.org/http://www.dur.ac.uk/p.m.townend/webServiceSecurity.ppthttp://java.sun.com/webservices/webservicespack.htmlhttp://www.develop.com/conferences/conferencedotnet/materials/W4.pdfhttp://www.15seconds.com/issue/010430.htmhttp://noops.prismtechnologies.com/talks/50/NOOPSDec11_Edit.ppthttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wseencryption.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wssecauthwse.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/wssecdrill.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwse/html/programwse2.asphttp://www.microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-FC7AB49B3EDD&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=21FB9B9A-C5F6-4C95-87B7-FC7AB49B3EDD&displaylang=en