This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HeaderElements must be namespace qualified when create soap client

 
Ramesh Desai
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

i am new to webservices.

i am facing problem when creating soap request.
error message : HeaderElements must be namespace qualified


can some body help me.


thanks,
Ramesh
 
Dan Drillich
Ranch Hand
Posts: 1183
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ramesh,

Can you please show us the SOAP request?

SOAP Header Element says -

Note: All immediate child elements of the Header element must be namespace-qualified.


It's interesting to look at the SOAP schema -




W3C XML Schema Design Patterns: Dealing With Change says -

In fact "##other" really means "any well-formed XML that is not from the target namespace of the type being defined" excluding elements with no namespace..


Regards,
Dan

 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
The SOAP 1.1 specification says:

A header entry is identified by its fully qualified element name, which consists of the namespace URI and the local name. All immediate child elements of the SOAP Header element MUST be namespace-qualified.

Reference: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383497

If you look at this example:

You see that the <Transaction> element is prefixed by a t (and : too, but that is not part of the prefix). The t is the namespace prefix which says that the <Transaction> element belongs to the namespace with the prefix t.
The error message you get is, as far as I understand, because a header in your SOAP request lacks this namespace prefix.
Best wishes!
 
Ramesh Desai
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dan,

below is my SOAP request header part,

<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-11707096" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>USERID</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>

i have completed body part, but unable to write code for header.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic