ASP.NET
  Home arrow ASP.NET arrow Page 8 - ASP.NET and Web Services, Part 1
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

ASP.NET and Web Services, Part 1
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 9
    2004-03-08

    Table of Contents:
  • ASP.NET and Web Services, Part 1
  • What Is a Web Service?
  • Creating a Web Service
  • Defining a Service-Oriented Architecture (SOA)
  • SOA Web Services
  • Primary Web Services Technologies
  • SOAP's Messaging Architecture
  • Other SOAP Attributes
  • More SOAP Attributes

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    ASP.NET and Web Services, Part 1 - Other SOAP Attributes


    (Page 8 of 9 )

    A SOAP message defines a SOAP actor, which is divided in two parts:

    • A default actor is the intended final recipient of a SOAP message.
    • An intermediary actor can act on the content of a SOAP message by modifying the content in some way.

    The intermediary actor may manipulate the message content in an unspecified way before forwarding the message to its final destination. Although the message is altered, it is still considered the same message as the one originally sent. An optional header element will transmit data that might not be appropriate to encode in the envelope body. For example, if a default actor receives an encoded, compressed message, it would need to know what type of algorithm is used to compress the code before it could decode the message. Other types of optional headers include the all-important authentication method, routing information, transactions, and security information. A default actor may require the sender to provide authentication information before the recipient can process the message. A message may require specific routing to more than one destination. In addition, the recipient may require security information to determine whether a message is modified before arriving at its destination. For example, it is important for a stock quote to remain in its original state before a brokerage firm can sell the stock to clients. The header element can be added to the SOAP envelope as a child element.Listing 2 demonstrates this.

    Listing 2 Defining a child node within the SOAP envelope


    <?xml version="1.0" encoding="utf-8" ? >
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header>
      
    <Manifest>BH784Fg23559></Manifest>
    </soap:Header>
    <soap:Body>
      
    <StockReport>
        
    <StockSymbol>JANS</StockSymbol>
        
    <Price>29.13</Price>
        
    <!--Oucha huge financial loss- ->
      
    </StockReport>
    </soap:Body>
    </soap:Envelope>

    The mustUnderstand Attribute

    Use the mustUnderstand attribute when information embedded within the header should not be ignored. Therefore, mustUnderstand provides a method for differentiating between noncritical information and mission-critical data that requires attention. By specifying a value of 1 in the header's root element, the identified data cannot be ignored. Listing 3 demonstrates how to use this attribute.

    Listing 3 Using the mustUnderstand attribute


    <?xml version="1.0" encoding="utf-8"? >
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      
    <soap:Header>
        
    <TransactionID soap:mustUnderstand="1">19.92</TransactionID>
      
    </soap:Header>
      
    <soap:Body>
        
    <UpdateStockQuote>
          
    <email>DPeltzer@IFCE.com</email>
          
    <f_Name>Dwight</f_Name>
          
    <l_Name>Peltzer</l_Name>
        
    </UpdateStockQuote>
      
    </soap:Body>
    </soap:Envelope>

    This example shows how the recipient must update the specified stock quote within scope of the client's transaction. In the event the transaction is going awry in some way, the application must roll back any changes made to the client's account. The mechanism used for this is the mustUnderstand attribute, and is achieved by setting the attribute to 1.

    Remember: This is part one of chapter 7 .NET & J2EE Interoperability, by Dwight Peltzer (McGraw-Hill/Osborne, ISBN 0-07-223054-1, 2004). If you like what you see, feel free to click on the following link to get your own copy!
    Buy this book now.

    More ASP.NET Articles
    More By McGraw-Hill/Osborne


     

    ASP.NET ARTICLES

    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX
    - Building a Simple Storefront with LINQ
    - Developing a Dice Game Using ASP.NET Futures...
    - Completing an ASP.NET AJAX Server-Centric Ba...
    - Information Management for an ASP.NET AJAX S...
    - Comment and Order Management for an ASP.NET ...
    - Back-end Management Tasks for an ASP.NET AJA...
    - User Information Management for an ASP.NET A...
    - Adding Comments and Search to an ASP.NET AJA...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway