OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Echo Fields

[ Lists Home | Date Index | Thread Index ]
  • From: "Abhishek Srivastava" <abisheks@india.hp.com>
  • To: "xml dev mailing list" <xml-dev@ic.ac.uk>
  • Date: Fri, 19 Nov 1999 10:57:49 +0530

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.
<emplno echo="true"> 414021 </emplno>
The following is the valid response
<name> Abhishek </name>
<surname> Srivastava </surname>
<emplno echo="true"> 414021 </emplno>
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 ?
    _/               Abhishek Srivastava
   _/                Hewlett Packard ISO      
  _/_/_/   _/_/_/    -------------------  
 _/    /   _/   _/     (Work)   +91-80-2251554 x1190
_/  _/   _/_/_/      (Ip)           
        _/           (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                      


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS