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

Bug in SoapDeserilizer File

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3 Final
    • 1.4 Alpha
    • Serialization
    • None

    Description

      I am working with Axis Client 1.3 (C++ ) version. I want to recieve
      a complex response coming from my apache SOAP server. For that I write
      my own Deserialize function and proced. I use the "getAnyObject"
      function of Deserializer object. I found that if my attribute contain
      no namespace it will not work. The code in Axis C++ client looks like
      (in SoapDeserializer.cpp file serializeTag function )
      if (node->m_pchAttributes[j])

      { pchPrefix = m_pParser->getPrefix4NS(node->m_pchAttributes[j+1]); // remainig code.... }

      m_pchAttributes[j+1] is null in my case. So the function throw an
      exception if i use the Expat XML parser. I think it is bug and code
      can be change to
      if (node->m_pchAttributes[j])
      {
      if(node->m_pchAttributes[j+1])

      { pchPrefix = m_pParser->getPrefix4NS(node->m_pchAttributes[j+1]); }

      // remainig code....
      }

      Another prblem in the same file and function is , code looks like
      xmlStr += " ";
      if (pchPrefix && (strcmp(pchPrefix, "")!=0))

      { xmlStr += pchPrefix; xmlStr += ":"; xmlStr += node->m_pchAttributes[j]; }

      xmlStr += "=\""; xmlStr +=
      node->m_pchAttributes[j+2]; xmlStr += "\"";

      here if namespace is null then the attribute name will not append to
      the result string . It can be modified to
      xmlStr += " ";
      if (pchPrefix && (strcmp(pchPrefix, "")!=0))

      { xmlStr += pchPrefix; xmlStr += ":"; }

      xmlStr += node->m_pchAttributes[j];
      xmlStr += "=\""; xmlStr +=
      node->m_pchAttributes[j+2]; xmlStr += "\"";

      Attachments

        Activity

          People

            samisa Don Samisa Abeysinghe
            shijith shijith lal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: