Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOAP doubt: The Envelope element

 
Asit Baran
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The schema for the Envelope defined at http://schemas.xmlsoap.org/soap/envelope/ is :

<xs:complexType name="Envelope">
- <xs:sequence>
<xs:element ref="tns:Header" minOccurs="0" />
<xs:element ref="tns:Body" minOccurs="1" />
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax" />
</xs:sequence>
.....
</xs:complexType>
Which implies that after the Body element there can be any number of child elements in Envelope. But as per BP conformance rule,
R1011 A MESSAGE MUST NOT have any element children of soap:Envelope following the soap:Body element.

Is not it self-contradictory? please share your views.

Thanks,
Asit
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
No, it is not contradictory.
The WS-I Basic Profile aims to clarify things in the related specifications that are unclear and advise against things that have proven to cause interoperability problems etc.
So, while the schema allows for additional elements after the SOAP <Body> element, the BP forbids it.
Perhaps there is some case in which you would want to use additional element(s) after the SOAP <Body>, which can be done as you note. However if you want your service to be interoperable with, for instance, clients developed by others and/or on other platforms, you should avoid this.
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic