[Mono-bugs] [Bug 61035][Blo] New - Invalid Cast Exception in doGetCachedPage in Google WS API

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 1 Jul 2004 21:06:11 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by kiwnix@yahoo.es.

http://bugzilla.ximian.com/show_bug.cgi?id=61035

--- shadow/61035	2004-07-01 21:06:11.000000000 -0400
+++ shadow/61035.tmp.5416	2004-07-01 21:06:11.000000000 -0400
@@ -0,0 +1,58 @@
+Bug#: 61035
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: Sys.Web.Services
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kiwnix@yahoo.es               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Invalid Cast Exception in doGetCachedPage in Google WS API
+
+Description of Problem:
+
+An Invalid Cast exception is thrown when calling the Google Web Service
+method "doGetCachedPage", in the WSDL it looks like returning a Base64
+encoded type, but the .cs generated file says is Byte[].
+
+
+A Test Case:
+
+using System;
+
+(The Generated file of the WSDL should be builded/linked with this)
+
+class Ppal
+{
+        public static void Main()
+        {
+                GoogleSearchService gss = new GoogleSearchService();
+                Byte[] pagina =
+gss.doGetCachedPage("valid_google_api_key","http://www.go-mono.com/index.html");
+                Console.WriteLine(pagina);
+        }
+}
+
+
+Actual Results:
+
+Unhandled Exception: System.InvalidCastException: Cannot cast from source
+type to destination type.
+in <0x000a9> GoogleSearchService:doGetCachedPage (string,string)
+in <0x0003e> Ppal:Main ()
+
+
+Expected Results:
+
+Page is printed.
+
+How often does this happen? 
+
+Allways.