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

To have the ability to NULL an array element in an array of complex type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • unspecified
    • unspecified
    • None
    • None
    • n/a

    Description

      Problem
      =======
      Assume that we have a 'nillable' DataType_Array that has been created from a WSDL as follows:-

      DataType_Array.hpp
      ------------------
      class DataType;

      typedef struct DataType_ArrayTag
      {
      DataType * m_Array;
      int m_Size;
      } DataType_Array;

      DataType.hpp
      ------------
      class DataType
      {
      public:
      xsd__int index;
      xsd__string string;
      };

      In our implementation we have defined a variable array 'pDataType' of type DataType length 5.

      Test.cpp
      :
      DataType * pDataType = new DataType[5];
      :

      Now, we want to populate indexes 2 and 3 with data, but leave the remaining array indexes (0, 1 and 4) empty (nill).

      >>>>>Q1. How is this done?

      NB: The serialised output should also look something like this...
      <ns2:DataType>
      <ns2:Item xsi:nil="true"/>
      <ns2:Item>
      <ns2:Item xsi:nil="true"/>
      <ns2:Item>
      <ns2:index>2</ns2:index>
      <ns2:string>String index 2</ns2:string>
      </ns2:Item>
      <ns2:Item>
      <ns2:index>3</ns2:index>
      <ns2:string>String index 3</ns2:string>
      </ns2:Item>
      <ns2:Item xsi:nil="true"/>
      <ns2:Item>
      </ns2:DataType>

      >>>>>Q2. How would the deserialiser cope?

      Attachments

        Issue Links

          Activity

            People

              prestonf Fred Preston
              prestonf Fred Preston
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: