Axis-C++
  1. Axis-C++
  2. AXISCPP-966

WSDL2WS generate wrong code: redundant value reference * in Wrapper

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6 Beta
    • Fix Version/s: current (nightly)
    • Component/s: WSDL processing - RPC
    • Labels:
      None
    • Environment:

      Description

      [Error Statement]:
      I have used AxisCPP1.6Beta version to generate SampleTestSoapWrapper.cpp as the below:
      Function: int SampleTestSoapWrapper::GetOperation(void* pMsg)
      xsd_string v0 = *(pIWSDZ->getElementAsString("ListType", 0));

      The generated code has bug: xsd_string is already indeed a "char ", so should not reference it's content by "".

      The correct code I expected is:
      xsd_string v0 = pIWSDZ->getElementAsString("ListType", 0);

      [solution]:
      I have investigated the source code of AxisCPP/WSDL2Ws tool, and found that if I modify the following code at about line 217~234 in writeMethodInWrapper method that belongs to WrapWriter (wsdl2ws/cpp/iteral) class, the above bug can be resolved.

      else

      { writer.write( "\t" + paraTypeName + " v" + i //<mxiong debug 20060425 + " = pIWSDZ->" // + " = *(pIWSDZ->" //>mxiong debug 20060425 + CUtils.getParameterGetValueMethodName( paraTypeName, false) + "(\"" + elementName // <mxiong debug 20060425 // + "\",0));\n"); + "\",0);\n"); // >mxiong debug 20060425 }

      So I think it's a bug.

      [other]
      I will create a patch for you and upload it later.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael Xiong
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development