SOAP Headers and Application level code

Fraser Goffin <[email protected]> Tue, 11 Feb 2003 16:02:29 +0000
Newsgroups gmane.comp.windows.devel.soap.general
Message-ID <[email protected]>
Should application message handlers ever need to refer to SOAP Headers or
are SOAP Headers regarded as information that is targeted at protocol
handlers that perform non application specific tasks such as authentication
or routing ?

If when designing a SOAP service the same peice of data is required for
application and non application specific purposes, should it be carried in a
SOAP Header AND as part of the SOAP Body payload ?

An example:

Say I pass authentication credentials as a SOAP Header (as follows). During
the processing of this message, I perform the authentication step extracting
the credentials from the SOAP header and passing to an authentication
process. If authentication is successful I call the service specific message
handler and use the authentication UserID as a lookup for other information
(say a commission rate). Would you expect the UserId data to appear as part
of the payload definition as well ? :-

<SOAP-ENV:Envelope xmlns:SOAP-ENV="..."
  <SOAP-ENV:Header>
    <frg:Authentication xmlns:frg="some-uri">
      <frg:UserId>0123456789</frg:CustomerRef>
      <frg:Pwd>135246</frg:Pwd>
    </frg:Authentication>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <ns1:myPayload xmlns:ns1="..."
    ...

Regards

Fraser.

_________________________________________________________________
Worried what your kids see online? Protect them better with MSN 8
http://join.msn.com/?page=features/parental&pgmarket=en-gb&XAPID=186&DI=1059

You can read messages from the SOAP archive, unsubscribe from SOAP, or subscribe to other
DevelopMentor lists at http://discuss.develop.com.