axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Karseras (JIRA)" <>
Subject [jira] Created: (AXIS2C-1259) AXIS2C: axutil_string: Close tag created at incorrect location
Date Fri, 05 Sep 2008 19:20:44 GMT
AXIS2C: axutil_string: Close tag created at incorrect location

                 Key: AXIS2C-1259
             Project: Axis2-C
          Issue Type: Bug
          Components: util
    Affects Versions: 1.4.0
         Environment: RedHat Linux
            Reporter: Andreas Karseras

Close tags are being created at incorrect locations for example:-


The following code when called multiple times illustrates the problem...

    void myClient::testMethod()
        const axis2_char_t *prefix = "cwmp";
        const axis2_char_t *uri = "urn:dslforum-org:cwmp-1-0";
        axiom_namespace_t *ns = axiom_namespace_create(env, uri, prefix);
        axiom_namespace_t *empty_ns = axiom_namespace_create(env, uri, "");   
        axiom_node_t *nodeA = axiom_node_create(env);   
        axutil_string_t* nodeAString = axutil_string_create (env,"getParameterValues");  

        axiom_element_create_str(env, NULL, nodeAString, ns, &nodeA);
        axiom_node_t *nodeB = axiom_node_create(env);       
        axutil_string_t* nodeBString = axutil_string_create (env,"ParameterNames");      
        axiom_element_create_str(env, nodeA, nodeBString, empty_ns, &nodeB);
        axiom_node_t *nameNode = axiom_node_create(env);
        axutil_string_t* nameString = axutil_string_create (env, "Name");
        axiom_element_create_str(env, nodeB, nameString, empty_ns, &nameNode);
        axiom_element_t *ele = (axiom_element_t *)axiom_node_get_data_element( nameNode, env);
        axiom_element_set_text( ele, env, "blah", nameNode);
        cout << axiom_node_to_string(nodeA,env) << endl;
        axiom_node_free_tree(nodeA, env);

The method is called multiple times with a sleep interval in between and creates the output
Note the ParameterNames tag for the last two iterations.

<cwmp:getParameterValues xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><ParameterNames><Name>blah</Name></ParameterNames></cwmp:getParameterValues>
<cwmp:getParameterValues xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><ParameterNames><Name>blah</Name></ParameterNames></cwmp:getParameterValues>
<cwmp:getParameterValues xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><ParameterNames><Name/>blah</Name></ParameterNames></cwmp:getParameterValues>
<cwmp:getParameterValues xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><ParameterNames/><Name/>blah</Name></ParameterNames></cwmp:getParameterValues>
<cwmp:getParameterValues xmlns:cwmp="urn:dslforum-org:cwmp-1-0"><ParameterNames/><Name/>blah</Name></ParameterNames></cwmp:getParameterValues>

This was confirmed by Dimuthu Gamage (see e-mail below)

Looks like the axiom node created with axutil_string is having problem, I too got the same
problem with your code, and I tried replacing axiom_element_create_str with axiom_element_create
and it was working correctly.

        axiom_node_t *nodeA = axiom_node_create(env);
        /*axutil_string_t* nodeAString = axutil_string_create (env,"getParameterValues");
        const axis2_char_t *nodeAString = "getParametervalues";
        axiom_element_create(env, NULL, nodeAString, ns, &nodeA);

I think axutil_string or use of axutil_string inside axiom is having a bug. Can you please
raise an issue on this at


This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message