QName = qualified name. It is the two part name of an element. For
example, the QName of this element: <foo:bar
xmlns:foo="urn:namespace:foo">blah</foo:bar>
is "foo:bar" which when deciphered really means "urn:namespace:foo}bar"
The "foo" in <foo:bar> is called the namespace prefix. It represents
the URI specified in the "foo" namespace declaration
(xmlns:foo="urn:namespace:foo")
The "bar" in <foo:bar> is called the local name.
The namespace for the element is defined by the targetNamespace
attribute in the schema that defines the element. So, for the above
example, the schema would look like this:
<s:schema targetNamespace="urn:namespace:foo"
xmlns:s=""http://www.w3.org/2001/XMLSchema">
<s:element name="foo" type="s:string/>
</s:schema>
So, going back to your original question, in order to retrieve a SOAP
header block by name, you must specify the QName of the SOAP header
block. The two parameters to the method include the namespace URI and
the local name.
Anne
On 5/6/05, Plorks mail <[EMAIL PROTECTED]> wrote:
>
>
> Thanks for the reply
>
> I'm not understanding QName and where this fits in.
>
> I'm new to web services. I've got my java files and created a wdsl to expose
> it's methods
>
> I'm now trying to call the methods to test
>
> >From: Anne Thomas Manes <[EMAIL PROTECTED]>
> >Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]>
> >To: [email protected]
> >Subject: Re: SOAPHeaderElement element = envelope.getHeaderByName
> >Date: Fri, 6 May 2005 07:55:18 -0400
> >
> >The first parameter is the namespace URI of the header's QName; the
> >second parameter is the local name. So, for example, if you wanted to
> >retrieve the WS-Security header:
> >
> ><wsse:Security
> >xmlns:wsse="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> >.../>
> >
> >The first parameter would be
> >"http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
> >
> >And the second parameter would be
> >"Security"
> >
> >Anne
> >
> >On 5/6/05, Plorks mail <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Please can someone help me
> > >
> > > I'm trying to implement the above line of code but stuck as to what to
> >put
> > > in the first parameter
> > >
> > > SOAPHeaderElement element =
> > > envelope.getHeaderByName("http://localhost:8080....what goes in here",
> > > "headername");
> > >
> > > Can some please help me
> > >
> > > Many thanks
> > >
> > > _________________________________________________________________
> > > It's fast, it's easy and it's free. Get MSN Messenger 7.0 today!
> > > http://messenger.msn.co.uk
> > >
> > >
>
> _________________________________________________________________
> Use MSN Messenger to send music and pics to your friends
> http://messenger.msn.co.uk
>
>