HOME | J2ME | Struts | AJAX | SOAP | SOA MEDIA STREAMING AXIS |
SOAP Tutorial
Introduction
Building Blocks
Fault Element
SOAP Header
SOAP Attachments

 

 

SOAP Header

Back | Tutorial Home | Next

This element is an optional block and is contains general information of the request/response. This element is usually used to hold data for following processes

  • Authentication
  • Transaction Handling

<soap:Envelope
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
soap:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/" >
<soap:Header>
<sec:checkSum xmlns:sec="urn:MySecServer" soap:mustUnderstand="1">
<checksumkey>54645764</checksumkey>
</sec: checkSum>
</soap:Header>
<soap:Body>
<lg:LoginRequest xmlns:lg="urn:MyServer">
<username>tom</username>
<password>tom123</password>
</lg:LoginResponse>
</soap:Body>
</soap:Envelope>

In the above SOAP message Header block is defined with a check sum key element to check the validity of the request. All the other parameters of the Header block are similar to the SOAP body block except the attribute soap:mustUnderstand defined in the first element of the header block. This attribute can be set as 0 or 1. When the attribute is set as “1”. The receiver understands that this block needs to be understood and executed and when this attribute is set to “0” this header block need not be executed.

Back | Tutorial Home | Next

site comments powered by Disqus
Download our free toolbar

toolbar powered by Conduit

| Copyright © 2009. All rights reserved | Terms and Conditions | About | Contact | Feed Back |