axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Subra A Narayanan" <aswat...@gmail.com>
Subject Bug in axis2c xml parsing?
Date Thu, 18 Oct 2007 20:02:15 GMT
Hello folks,

I use the following code to parse an incoming ws request. I am posting only
snippets of the code for sake of brevity

******************************************************************CODE
BEGIN***************************************************************************
    axutil_qname_t *Qname = axutil_qname_create(env, "Price",
MY_NAMESPACE_URI, MY_NAMESPACE_PREFIX);
    axiom_node_t *myNode = NULL;
    axiom_element_t *myElement = NULL;
    myElement = axiom_element_get_first_child_with_qname(rootElement, env,
Qname, rootNode, &myNode);

    if (myNode)
    {
        ...................................
        ...................................
        ...................................
        return AXIS2_SUCCESS;
    }
    else
    {
        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Error!!");
        return AXIS2_FAILURE;
    }

******************************************************************CODE
END**************************************************************************

If I have a node like this, it just works fine (here 'MyOperation' is the
root node from above)

<MyOperation>
       <Price>250</Price>
</MyOperation>


but if I have a node like this

<MyOperation>
       <ns:Price />
</MyOperation>

the control goes in to the else condition and it returns AXIS2_FAILURE

I would think this shouldn't be happening since we do have a 'Price' node
although it is empty.

Is this by design or have I found a bug?


Thanks,
Subra

Mime
View raw message