I have an outstanding issue which I haven't found a solution for
sometime now. Suppose we have these classes:
PropertyNameAndValueType -parent class that stores a String
name
PropertyNameAndStringValueType -child class that stores a String name
and String value
PropertyNameAndBlobValueType -child class that stores a String name
and Object value
I have a QueryService resource that defines a Get operation:
get(String name, PropertyNameAndValueType[] args)
This operation takes in a list of generic PropertyNameAndValueType
objects, and sub-handlers must cast them to the specific
*StringValueType or *BlobValueType classes as needed.
On the client side proxy, I am passing an array of specific
PropertyNameAndStringValueType objects. This gets sent to server ok.
But, the problem is that on the server side, Muse calls my serializer
for the base PropertyNameAndValueType, which returns these types of
objects. Down in the sub-handlers layer, I am getting exceptions
because I can't cast the objects to a specific
PropertyNameAndStringValueType.
The same design problem occurs when the server sends out generic types,
and the client needs to cast them to specific types.
What is the proper way to leverage Muse so that operations can define
generic parameter types, but internal logic can still convert them to
the specific types?