[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Echo Fields

  • From: "Abhishek Srivastava" <abisheks@i...>
  • To: "xml dev mailing list" <xml-dev@i...>
  • Date: Fri, 19 Nov 1999 10:57:49 +0530

echo fields
Hi,
 
I am designing a client server system that exchanges data thru XML.
We have to implement something as "ECHO" Fields.
 
What this means is that, in the request that the client sends to the server,
there are some fields that are marked as echo fields. Echo fields are optional fields when building a request
but, when included in the request, it becomes mandatory for the server to echo ( send back without modification) them back, in the response.
 
For example  let's take a simple request. where the client send an employee number to the server, and the server returns the name of the employee.
 
<request>
<emplno echo="true"> 414021 </emplno>
</request>
 
The following is the valid response
 
<response>
<name> Abhishek </name>
<surname> Srivastava </surname>
<emplno echo="true"> 414021 </emplno>
</response>
 
If the server skips the emplno element then the response should not be treated as a valid document. And the parser should throw an exception as a mandatory field is missing.
However, if the client had not sent the emplno field in the request, then the emplno field would have been optional in the response.
 
How can this be done ?
 
regards,
Abhishek.   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _/               Abhishek Srivastava
   _/                Hewlett Packard ISO      
  _/_/_/   _/_/_/    -------------------  
 _/    /   _/   _/     (Work)   +91-80-2251554 x1190
_/  _/   _/_/_/      (Ip)     15.10.47.37           
        _/           (Url)    http://sites.netscape.net/abhishes/index.html                       
       _/           
                     Work like you don't need the money.
                     Dance like no one is watching.
                     And love like you've never been hurt.
                     --Mark Twain                      
                    
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.