aspose file tools*
The moose likes Web Services and the fly likes Question: why the soap header must be the first child element of the Envelope element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Question: why the soap header must be the first child element of the Envelope element" Watch "Question: why the soap header must be the first child element of the Envelope element" New topic
Author

Question: why the soap header must be the first child element of the Envelope element

Yang Jiao
Greenhorn

Joined: Apr 04, 2006
Posts: 1
In the SOAP specs, it says, "The SOAP Header is encoded as the first immediate child element of the SOAP envelope. "

Why the header must be the first child?

Is it because of SAX parser? So that the header can be processed before body?

Any other concerns?


SCJP SCJD SCWCD SCEA MCSA.NET OCA
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42294
    
  64
I would guess performance reasons. The body can be quite large, and if an intermediary only needs to process the header, then this convention ensures that it doesn't need to parse the whole request.


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: Question: why the soap header must be the first child element of the Envelope element