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

Cannot process a POJO-based Web Service (i.e. uses RPCMessageReceiver). If any of its operations take Array of NON-OMelement parameters when requested with Wrapped-Array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5, 1.5.1
    • 1.7.0
    • adb
    • None

    Description

      The Axis2 1.5 official release/trunk cannot process a POJO-based Web Service (i.e. one that uses RPCMessageReceiver) that takes as parameter to any of its operations Array of NON-OMelement parameters when request contains Wrapped-Array. I have tested the case when I have a WS with the following simple implementation:

      public class ArrayServiceSimple {
      public int[] getInts (int[] intArr)

      { return intArr; }

      }

      When we deploy and invoke the WS operation a request send is:

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservice.lab">
      <soapenv:Header/>
      <soapenv:Body>
      <web:getInts xsi:schemaLocation="http://webservice.lab note3.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <!-Zero or more repetitions:->
      <web:intArr>1</web:intArr>
      <web:intArr>2</web:intArr>
      </web:getInts>
      </soapenv:Body>
      </soapenv:Envelope>

      The Array send is wrapped-array. That causes a NumberFormatException to be thrown when processed in org.apache.axis2.databinding.utils.BeanUtil#deserialize(OMElement response,Object [] javaTypes,ObjectSupplier objectSupplier).

      I have patches for the issue, but cannot attach them right now. I need to synchronize this with my company and will post them within 3 days.

      Regards,
      Dobri

      Attachments

        1. ArrayServiceSimple.aar
          6 kB
          Dobri Emilov Kitipov

        Activity

          People

            Unassigned Unassigned
            dobri Dobri Emilov Kitipov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: