Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13734

.NET Service loses returned array type information

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9
    • 2.10
    • platforms
    • None
    • .NET: Fix typed array passing in Services

    Description

      .NET service client receives Object[] instead of strongly typed array from a .NET service. 

      There was another already resolved similar issue IGNITE-12823 that addressed the problem of using arrays as parameters. The problem of using arrays as results still exists.

      Reproducer

      A .NET service returning an array of user-defined types is deployed:

      public interface ITestService
      {
          Parameter[] TestReturnParametersArray();
      }
      
      public sealed class Parameter
      {
          public int Id { get; set; }
          public int[] Values { get; set; }
      }
      

      A .NET client calls the service:

      Parameter[] res = svcProxy.TestReturnParametersArray()
      

      The service call fails with exception:

      System.InvalidCastException : Unable to cast object of type 'System.Object[]' to type 'Parameter[]'.
      

      Attachments

        1. IGNITE-13734-from-2.9.0.patch
          41 kB
          Alexey Kukushkin

        Issue Links

          Activity

            People

              nizhikov Nikolay Izhikov
              kukushal Alexey Kukushkin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h