Title: Axis2 OMElement issues in nightly
No it didn't actually. In order to send the e-mail I have changed my original code (i.e. changed the namespace and method names for simplicity) and when I was crafting my e-mail I made a typo in the namespace. The original code (I have double checked after your e-mail again) has the correct namespaces.
 
Does axiom working correctly for you in the nightly axis2 ?
 
Gul
 
 

From: Nigel Charman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 07, 2006 12:12 PM
To: Onural, Gul (CAR:SI12)
Cc: [email protected]
Subject: Re: Axis2 OMElement issues in nightly

Hi Gul

The namespace in your XML is http://www.example.com, and in your code is http://example.com.  Does it work OK if you correct the namespaces to match?

Cheers
Nigel

Gul Onural wrote:


I am thinking that the Axiom in nightly Axis2 (RC1.1) is broken.
What I am trying to do is really simple:

I have a service method takes OMElement as input and returns
an OMElement as output.

At the beginning of the method, I print the OMElement input parameter
and I see it as expected. But when I try to iterate elements of the
OMElement using following code I don't see the child elements but get
null pointer instead.

Is this a known issue ? This code was working couple of weeks ago.

Gul

Xml snippet
==========
<tns:CreateSimpleXXXRequest xsi:schemaLocation="http://www.example.com CommonTypes.xsd" xmlns:tns="http://www.example.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <tns:simpleXXX>
      <tns:name>String</tns:name>
   </tns:simpleXXX>
</tns:CreateSimpleXXXRequest>


Code snippet
==========
Iterator children = element.getChildren();
while (children.hasNext()) {
OMElement root = (OMElement) children.next();
  System.out.println("ELEMENT = " + root.toString());
    OMElement temp = root.getFirstChildWithName(new QName(
       "http://example.com", "name"));
        if (temp != null) {
                System.out.println("NAME = " + temp.getText());
        }
}

Reply via email to