Uploaded image for project: 'Axis-C++'
  1. Axis-C++
  2. AXISCPP-353

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • Basic Architecture
    • None

    Description

      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'

      Attachments

        Activity

          People

            roshan W.M. Roshan Weerasuriya
            perryan Andrew Perry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: