In WebServices QTP script,
Object required: '[string: "/9j/4AAQSkZJRgABAQEA"]'
Line (23): "Set GetTransactionImage = WebService("XYZZWebService").GetTransactionImage(K ey,TransactionId,0)".
getting the above error, couldn't figure out..
key is string
TransactionId is string
last parameter is int, so i am just passing the zero
Well if that's a direct copy/paste you've got a space in the variable name Key.
that space mistake is here not in the script
2 things, no need to wrap the whole line in double-quotes and no need for full stop at end
double-quotes and full stop are from the Run Error window.
I guess this is related to decoding the Base64 image. You have to get the encoded string & decode it to convert it to an image.
The error message itself is related to the SET statement. The GetTransactionImage method is returning a string & not an object, but an object is expected when you use SET statement & hence the error.
Last edited by Rajkumar Rajangam; 01-12-2013 at 06:09 PM.
I believe this would mostly be a BASE64 image data that is being returned as a string and you are trying to get that into an object as Rajkumar already mentioned. You should just update the code as below
GetTransactionImage = WebService("XYZZWebService").GetTransactionImage(K ey,TransactionId,0)