Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

BP 1.1 Clarification related to parts attribute of <soapbind:body> element.

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is what BP 1.1 says which finds mention in even Ivan's notes. Here is what Ivan's notes say.



• In a Document/Literal description where the <soapbind:body> element has a parts attribute
with the value “” (the empty string), the corresponding envelope must have an empty SOAP
<Body> element.
• In a RPC/Literal description where the <soapbind:body> element has a parts attribute with
the value “” (the empty string), the corresponding envelope must have no part acceparts attributessor
elements.



Here are my questions.

  • Unless I missed something in Ivan's notes and in RMH, it doesn't talk about parts attribute of <soapbind:body> element. What is it used for.
  • In a Document/Literal description where the <soapbind:body> element has a parts attribute
    with the value “” (the empty string), the corresponding envelope must have an empty SOAP
    <Body> element


    Are we talking abt a SOAP message with an empty <Body> element. What purpose would it serve. I am assuming somehow it would be answered by the first question but still wanted to put my doubt forth.

  • If someone could post an example of SOAP envelope for both RPC/Literal format with parts attribute = "" that would be really helpful.


  • Thanks
     
    Ranch Hand
    Posts: 558
    2
    Hibernate Spring Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Kamal,

    May be I'm mistaken and would appreciate, if some one corrects me here.

    When I looked into the schema http://schemas.xmlsoap.org/wsdl/soap for soapbind:body element, below is what I see


    <xs:element name="body" type="soap:tBody" />
    - <xs:attributeGroup name="tBodyAttributes">
    <xs:attribute name="encodingStyle" type="soap:encodingStyle" use="optional" />
    <xs:attribute name="use" type="soap:useChoice" use="optional" />
    <xs:attribute name="namespace" type="xs:anyURI" use="optional" />
    </xs:attributeGroup>
    - <xs:complexType name="tBody">
    - <xs:complexContent>
    - <xs:extension base="wsdl:tExtensibilityElement">
    <xs:attribute name="parts" type="xs:NMTOKENS" use="optional" />
    <xs:attributeGroup ref="soap:tBodyAttributes" />
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>



    parts attribute is of type NMTOKENS which means it should be non zero length of sequence as per definition

    The ·value space· of NMTOKENS is the set of finite, non-zero-length sequences of ·NMTOKEN·s. The ·lexical space· of NMTOKENS is the set of space-separated lists of tokens, of which each token is in the ·lexical space· of NMTOKEN. The ·itemType· of NMTOKENS is NMTOKEN.


    So I do not understand, why BP1.1 could actually say about parts="", when it is not allowed by spec.
     
    Ranch Hand
    Posts: 1183
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    "soap:body" - Binding for SOAP Body seems to explain it well.

    parts="nmtokens" - Indicates with part or parts defined in the input or output message (specified through the "wsdl:portType" element) are used to construct this SOAP Body. If not provided, all parts are used.



    So, three scenarios exist -

    Parts attribute doesn't exist - all input or output messages are used to construct the SOAP Body.
    Parts attribute exists and it's "" - SOAP Body would be empty.
    Parts attribute exists and it lists messages - SOAP Body would have only these parts.

    Regards,
    Dan
     
    Kumar Raja
    Ranch Hand
    Posts: 558
    2
    Hibernate Spring Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Agreed,

    but NMTOKENS means it should be a non zero length sequence, then how can we use parts="", which means a zero lenght here.
     
    Greenhorn
    Posts: 7
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Dan/Kumar,
    I'm facing a problem in auto generated wsdl which has parts="" for soap:body while adding it as web reference in visual studio2008. I have created new thread webpage. Could you please clarify my doubts, Many thanks in advance.
     
    Willie Smits can speak 40 languages. This tiny ad can speak only one:
    Devious Experiments for a Truly Passive Greenhouse!
    https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
      Bookmark Topic Watch Topic
    • New Topic