Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5199

Deserialization of an array type property of a bean, while calling a web-service operation with an array of beans in the request, gives error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.6.0
    • 1.6.2, 1.7.0
    • adb, client-api, databinding
    • None
    • ADB data-binding at client-side and and axis2 version is 1.6.0.

    Description

      I have described beans as follows:
      public class A implements Serializable {
      private String prop1;
      private Date prop2;
      private Integer prop3;
      private Double prop4;
      private B[] propArrayB;
      private C[] propArrayC;
      //getter and setter methods
      }

      public class B implements Serializable {
      private String prop1;
      private Date prop2;
      private Integer prop3;
      private Double prop4;
      //getter and setter methods
      }

      public class C implements Serializable {
      private String prop1;
      private Date prop2;
      private Integer prop3;
      private Double prop4;
      //getter and setter methods
      }

      I have implemented a web-service with an exposed operation as:
      public boolean saveAes(A[] aes, String token)

      The below line is giving an error, and finally a java.lang.StackOverflowError is thrown:
      org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:467)

      The error seems to be at the server-side before the object in SOAP request is deserialized into POJO. The web-service operation is not getting called (log statements within implemented 'init' method of org.apache.axis2.service.Lifecycle and the web-service operation are not seen).

      I am able to obtain request message from the MessageContext and the soap message structure of request message seems ok.

      I have another web-service operation in which sends a bean containing A[] in response. The above error is not seen in this case. So I think this issue is only when an array is sent to server packaged within a bean, and not when server is sending back a similar object in response.

      Regards,
      TAM Tenfold5

      Attachments

        1. Axis2Test.7z
          9.97 MB
          TAM Tenfold5

        Issue Links

          Activity

            People

              sagara Sagara Gunathunga
              tam_tenfold5 TAM Tenfold5
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: