• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Do grandchildren of Soap:body element need to be fully qualified?

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In Basic Profile 1.0, it is specified that Children of Soap:body MUST be fully qualified.
-------------------------------------------------------------------------
R1014 The children of the soap:Body element in a MESSAGE MUST be namespace qualified.
------------------------------------------------------------------------
Should GrandChildren of Soap:body also need to be namespace qualified ?

For example, it this SOAP message valid:-
<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' >
<soap:Body>
<p rocess xmlns ='http://example.org/Operations' >
<Data xmlns:m='http://example.org/information' >
Here is some data with the message
</Data>
</p rocess>
</soap:Body>
</soap:Envelope>

Here, <Data> element is not namespace qualified.
In my understanding, it is valid.

Thanks,
Anuj
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All of the local elements of a SOAP message must be namespace-qualified (prefixed with the SOAP 1.1 namespace), because the XML schema for SOAP 1.1 specifies the elementFormDefault attribute as "qualified". In addition, the Basic Profile 1.0 requires that all the application-specific elements contained by the Body element must be qualified.BP Unqualified elements in a SOAP Body element create too much ambiguity as to the meaning and proper structure of elements.
Example below shows that even accountName (grandchild of soap:Body element) has been namespace qualified.

 
Anuj Singhal
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Original message:-
------------------------------------------------------------------------
All of the local elements of a SOAP message must be namespace-qualified (prefixed with the SOAP 1.1 namespace), because the XML schema for SOAP 1.1 specifies the elementFormDefault attribute as "qualified".
------------------------------------------------------------------------
Do you mean Schema for the SOAP/1.1 envelope having targetnamespace http://schemas.xmlsoap.org/soap/envelope/
It is true that this schema mandates local elements defined in this schema to be namespace qualified in an XML document, which means Header, Body and Fault need to be fully quanlified.
However this schema can no way restrict body element to contain XML fragment with fully qualified names, only SOAP specification or BP can do that.


Original message:-
---------------------------------------------------------------------------
In addition, the Basic Profile 1.0 requires that all the application-specific elements contained by the Body element must be qualified.BP Unqualified elements in a SOAP Body element create too much ambiguity as to the meaning and proper structure of elements.
---------------------------------------------------------------------------

True. That's what is mentioned in clause R1014 of BP , as i said in my initial post. It tells only about direct child of Body element, but nothing about Grand children.
In RMH, i have seen RPC style SOAP XML documents, in which GrandChildren are not fully-qualified. i assume that they are BP complaint SOAP message.



Thanks,
Anuj
 
Watsh Rajneesh
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm.. i see your point. Thank you i have already started forgetting things . You are right .. the immediate child of soap:Body element only MUST be namespace-qualified as mandated by the BP 1.0 but the grand children (or children of the body entries) MAY be namespace-qualified. Here's a concise article on this.

Thanks,
Watsh
 
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whether the soap:Body element's grand children need to be prefixed or not depends on the schema where the soap:Body element's immediate child is declared. If the soap:Body's immediate child (for example, purchaseOrder) is defined in a schema whose's elementFormDefault is qualified, then the children of purchaseOrder, ie grand children of soap:Body must be namespace-qualified with the targetNamespace of that schema, but if the schema where the soap:Body's immediate child is defined declares elementFormDefault as unqualifed, then the grand children of soap:Body ie the children of the purchaseOrder element need not be qualifed and implicitly assume the namespace of its parent

And if you use default namespaces, you can leave both the soap:Body's immediate child and its grand children unqualified.

Let me know if my understanding is right
 
Ranch Hand
Posts: 238
1
Eclipse IDE Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

B.Sathish wrote: if the schema where the soap:Body's immediate child is defined declares elementFormDefault as unqualifed, then the grand children of soap:Body ie the children of the purchaseOrder element need not be qualifed and implicitly assume the namespace of its parent


Let me know if my understanding is right



Are you sure that unqualified local elements assume the namespace of their parents?I thought they were in null namespace,and only global elements go in the targetnamespace.

Please correct me if I am wrong.

Thanks...
reply
    Bookmark Topic Watch Topic
  • New Topic