Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6467

Jaxrs client handles array type property in a form object as a single element

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.16, 2.7.16, 3.1.1
    • 3.1.1, 2.7.17, 3.1.2
    • JAX-RS
    • Unknown

    Description

      class MyForm {
      String name;
      Integer[] vals;
      }
      //----------------------------
      @PUT
      @Path("test")
      @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
      void test(@FormParam("") MyForm frm);
      //----------------------------
      frm.name="blabla";
      frm.vals=new Integer[]

      {1,2}

      ;
      service.test(frm);
      //----------------------------
      expected POST entity body:
      name=blabla&vals=1&vals=2
      but actual entity body:
      name=blabla&vals=[Ljava.lang.Integer;@16554210

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            pqian Pengling Qian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: