Hi Sergey,
I'm testing also other endPoints after their RESTization and I've found
another problem connected to particular input parameters...
I've this ws method:

        @GET
        @Path("/parseGenCommandArgs")
        @ApiOperation(value = "Parses the given set of arguments according to 
the
data model of the given command in order to prepare the XML to be sent to
Dory for the realization of the given generic command.", 
                                        notes = "Returns a String representing 
the XML to be sent to Dory.", 
                                        response = String.class, produces 
="application/xml,application/json")
        public String parseGenCommandArgs(
                        @ApiParam(value = "appGardenID", required = true) 
@WebParam(name =
"appGardenID") @QueryParam("appGardenID")
@CxfWSAuthGrain(type=authType.appGarden) int appGardenID,
                        @ApiParam(value = "protType", required = true) 
@WebParam(name =
"protType") @QueryParam("protType")  short protType, 
                        @ApiParam(value = "profileID", required = true) 
@WebParam(name =
"profileID") @QueryParam("profileID") int profileID, 
                        @ApiParam(value = "objectIDhigh", required = true) 
@WebParam(name =
"objectIDhigh") @QueryParam("objectIDhigh") int objectIDhigh, 
                        @ApiParam(value = "objectIDlow", required = true) 
@WebParam(name =
"objectIDlow") @QueryParam("objectIDlow") int objectIDlow,
                        @ApiParam(value = "args", required = true) 
@WebParam(name = "args")
@QueryParam("args") List<String[]> args) throws Exception;

and when I call the method the exception: 

    java.lang.ClassCastException:
sun.reflect.generics.reflectiveObjects.GenericArrayTypeImpl cannot be cast
to java.lang.Class

occurs on server side, before arriving in the ws method implementor.
It is due to the serialization of the List<String[]> input parameter. 
I've tried to remove the annotation @QueryParam("args") but in this case it
continue to not work and a class cast exception occurs client side. 
Any idea about this problem?
Thanks,

Andrea

P.S.
For the previous problem it is solved using the Byte[] or removing the
@QueryParam annotation. 



--
View this message in context: 
http://cxf.547215.n5.nabble.com/java-lang-ClassCastException-B-cannot-be-cast-to-Ljava-lang-Object-tp5730141p5730163.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to