BasicNode->setValue does not set a new value but appends to any current value
-----------------------------------------------------------------------------

         Key: AXISCPP-353
         URL: http://issues.apache.org/jira/browse/AXISCPP-353
     Project: Axis-C++
        Type: Bug
  Components: Basic Architecture  
    Reporter: Andrew Perry


In a handler I am creating a HeaderBlock, creating a child character node, 
setting a value into the new node and adding the new node to the headerblock. I 
then clone the headerblock and reset the localname and uri, but when trying to 
set a new value it appends it to the value of the character node set in the 
first header block rather than setting it to the new value.

------ code snippit -----

        IHandlerSoapSerializer* pISZ;
        pIMsg->getSoapSerializer(&pISZ);

        IHeaderBlock* pIHeaderBlock = pISZ->createHeaderBlock("ahb", 
"http://soapinterop.org/axis/";);
        BasicNode* pBasicNode = pIHeaderBlock->createChild(CHARACTER_NODE);
        pBasicNode->setValue("This is a test");
        pIHeaderBlock->addChild(pBasicNode);

        IHeaderBlock* pIHeaderBlock2 = pIHeaderBlock->clone();
        pIHeaderBlock2->setLocalName("ahb2");
        pIHeaderBlock2->setUri("http://soapinterop.org/axis2/";);
        BasicNode* pBasicNode2 = pIHeaderBlock2->createChild(CHARACTER_NODE);
        pBasicNode2->setValue("Test2");
        pIHeaderBlock2->addChild(pBasicNode2);
        pISZ->addHeaderBlock(pIHeaderBlock2);

-------------------------

This creates the following SOAP header

<SOAP-ENV:Header><ns2:ahb xmlns:ns2="http://soapinterop.org/axis/";>This is a 
test</ns2:ahb><ns3:ahb2 xmlns:ns3="http://soapinterop.org/axis2/";>This is a 
testTest2</ns3:ahb2></SOAP-ENV:Header>

setValue should set the value of the node to the specified value and not append 
it, i.e. it should set the value of ahb2 to 'Test2' and not append 'Test2' to 
'This is a test'


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to