P
psm
I have a web service that returns Field[][]. The Field object contains
Name (type string) and Val (type object).
I am using it to return back a user-defined selection of properties of
an task object, hence Val being of type object.
This web service works fine, until I try to put another Field[][]
(containing an array of historical values of the task object) in to
the Val of one field, and then I get a SOAP Exception:
Unable to cast object of type Field[][] to Field[]
I have to say that I'm struggling to understand the error. I know that
the web service can return Field[][] at the top level, so I don't
understand why it can't cope with it further down the object hierachy
I've tried all manner of XML serialization attributes, and nothing
makes a difference.
Any suggestions, other than wrapping the second Field[][] in another
class, which I'd rather not do, as the historical task data is in the
same format as the current task data, so it doesn't seem to make sense
to have different objects for them?
Cheers,
Paul
Name (type string) and Val (type object).
I am using it to return back a user-defined selection of properties of
an task object, hence Val being of type object.
This web service works fine, until I try to put another Field[][]
(containing an array of historical values of the task object) in to
the Val of one field, and then I get a SOAP Exception:
Unable to cast object of type Field[][] to Field[]
I have to say that I'm struggling to understand the error. I know that
the web service can return Field[][] at the top level, so I don't
understand why it can't cope with it further down the object hierachy
I've tried all manner of XML serialization attributes, and nothing
makes a difference.
Any suggestions, other than wrapping the second Field[][] in another
class, which I'd rather not do, as the historical task data is in the
same format as the current task data, so it doesn't seem to make sense
to have different objects for them?
Cheers,
Paul