R
Russ
I need to pass a variable list of arrays to a web service. The web
service is C++ and the WebMethod is declared:
[System::Web::Services::WebMethod (Description="Submit Check.")]
bool SubmitCheck (UINT empno, ArrayList* List);
It is expecting an ArrayList consisting of an undetermined number of
arrays of type double. In this case all the arrays have the same
dimension (9).
In my Web Client I create an ArrayList containing some double arrays,
and then try to pass it like:
ws.SubmitCheck (m_Empno, (object[]) List.ToArray (typeof (double)));
I get the error "InvalidCastException: At least one element in the
source array could not be cast down to the destination array type".
I've tried a number of variations but nothing works, or makes much
sense to me. How can I accomplish this?
Thanks Russ
service is C++ and the WebMethod is declared:
[System::Web::Services::WebMethod (Description="Submit Check.")]
bool SubmitCheck (UINT empno, ArrayList* List);
It is expecting an ArrayList consisting of an undetermined number of
arrays of type double. In this case all the arrays have the same
dimension (9).
In my Web Client I create an ArrayList containing some double arrays,
and then try to pass it like:
ws.SubmitCheck (m_Empno, (object[]) List.ToArray (typeof (double)));
I get the error "InvalidCastException: At least one element in the
source array could not be cast down to the destination array type".
I've tried a number of variations but nothing works, or makes much
sense to me. How can I accomplish this?
Thanks Russ