• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

SOAP doubt: The Envelope element

Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" />
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.

Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
Maybe he went home and went to bed. And took this tiny ad with him:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic