Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Yang Jiao
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic