Win a copy of AWS Security this week in the Cloud/Virtualization 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

Doubt in soap:header

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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: 221
  • Mark post as helpful
  • send pies
  • 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
  • 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 ?
 
Where all the women are strong, all the men are good looking and all the tiny ads are above average:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic