Hi, Just as David said please use the namespace URL (not the prefix) to get a qualified attribute. if you look at the two argument QName constructor the first one is the namespace URL
Ajith On 3/8/07, David Illsley <[EMAIL PROTECTED]> wrote:
Can I suggest trying with a QName which includes the xsi namespace value? David On 08/03/07, Gul Onural <[EMAIL PROTECTED]> wrote: > > > > > I have an OMElement response coming from my web services written in Axis2. > > <?xml version="1.0" encoding="UTF-8"?> > <tns:XResponse xmlns:tns="mynamespace" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <tns:myObject xsi:type="tns:Type1_T"> > <tns:name>aName</tns:name> > </tns:myObject> > </tns:XResponse> > > On the web services client side, I am trying to determine the xsi:type > attribute value, using following code snippet, > but type (in below code snippet) seems to be null : > // response is the OMElement shown above. > > Iterator it = response.getChildElements(); > while (it.hasNext()) { > OMElement element = (OMElement) it.next(); > if ((element.getLocalName()).compareTo("myObject") == 0) { > OMAttribute type = element.getAttribute(new QName("xsi", > "type")); > // type is NULL…Why ????? > } > > Could you please let me know what I am doing wrong ? > > Thanks -- David Illsley - IBM Web Services Development --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Ajith Ranabahu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
