• 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

Doubt in soap:header

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In rmh it says - soap header blocks are not required to be namespace qualified.But in mikalai notes it says it is mandatory to qualify all the children of soap:header element.

Can any one help me on this issue.
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it is mandatory.
From the schema for a SOAP Envelope
http://schemas.xmlsoap.org/soap/envelope/
the Header type is defined as follows

<xs:complexType name="Header">

<xs:sequence>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>

which I believe means that the contents of the Header need a non null namespace, and it has to be other than the name space of the Header.
 
michael warren
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Havin given it some more thought (its more interesting than actually revising for the cert., which is what I should be doing)

I think you may be confusing the actual Header element with its children - the Header element needs to be in the "http://schemas.xmlsoap.org/soap/envelope/" namespace.

The children of the Header element need to be in some other namespace - at first I thought they couldn't be in the default namespace, but having tried the following it seems they can, I guess the default namespace isn't 'null', whatever null means in the context of namespaces.

(I'm using architag xml editor to experiment with schemas with http://www.architag.com/xray/ )



[ March 21, 2007: Message edited by: michael warren ]
[ March 21, 2007: Message edited by: michael warren ]
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
So the Header-Elements(I.e immediate child element SOAP HEADER TAG
<soap:Header>
can be in any Namespace URI and cannot be given without namespace qualified or NULL URI
Am i rite
 
michael warren
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think they can go without namespace being qualified (i.e. default namespace), assuming the soap namespace is qualified (as in my example above)- if soap is the default namespace, then the child elements need to be qualified to something different.
Not sure how you would have a null URI - do you have an example XML ?
 
and POOF! You're gone! But look, this tiny ad is still here:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic