Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-669

Fix List response body deserialization problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • service-center-1.0.0-m2
    • None
    • None

    Description

      When a provider has a rest operation whose response is List<Pack>, and the type Pack is like below

      public class Pack{
        private String name;
        private int i;
        // PackageProp is a type defined by user, and it only contains simple java type
        private List<PackageProp> packagePropList;
      }
      public class PackageProp{
        private String name;
        private int j;
        private String prop;
      }
      

      We can use postman to invoke the rest operation directly and it works well. But if we invoke this operation via EdgeService, the response body will be deserialized in edge unproperly. The edge treat the response List<Pack> as List<PackageProp>.

      Attachments

        1. invokeViaEdgeService.jpg
          184 kB
          Haishi Yao
        2. invokeProviderDirectly.jpg
          225 kB
          Haishi Yao

        Issue Links

          Activity

            People

              yaohaishi Haishi Yao
              yaohaishi Haishi Yao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: