Thanks
This is that happens:
Unable to perform your search:
com.google.soap.search.GoogleSearchFault: [SOAPException:
faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type
"text/html", must be: "text/xml". Response was: ....
Additional information: The request failed with HTTP status 502: Bad
Gateway."
shows up when the compiler reaches the line of "object[] results" in
web reference/..reference.cs
Public GoogleSearchResult doGoogleSearch(string key, string q, int
start, int maxResults, bool filter, string restrict, bool safeSearch,
string lr, string ie, string oe) {
object[] results = this.Invoke("doGoogleSearch", new
object[] {
key,
q,
start,
maxResults,
filter,
restrict,
safeSearch,
lr,
ie,
oe});
return ((GoogleSearchResult)(results[0]));
}
I too got an error with the google api today.
'System.Web.Services.Protocols.SoapException: Exception from service
object: Problem looking up user record.'
Its been working fine for weeks and weeks. Did they change the API
today??
Justin.
~Justin
What is the intent of the following java -cp command and what are its
parameters -
Directive and Args. I think I am missing out how the command works.
Below is the session on XP workstation....
C:>java -cp googleapi.jar com.google.soap.search.GoogleAPIDemo "mykey"
test test.com
Parameters:
Client key = keyhere686
Directive = test
Args = test.com
Usage: java com.google.soap.search.GoogleAPIDemo <client-key> (search
<query> |
cached <url> | spell <phrase>)
Thanks and please let me know if I have missed something here. Can one
run searches from command line like above. Does someone have a working
example. The example file that comes with the package says that the
package should run as it is.
However the other libraries don't make this assumption, so they do pass
the (redundant) type information over. There are quite a few messages
on the internet, besides these ones on Google Groups, about programs
that were working calling the API that are now failing, so it looks
like Google has changed their end to use libraries which expect to be
told the data type for request parameters (rather than using the WSDL
to get that).
I found that I could then get the spelling suggestions call working
okay by creating a local copy of the WSDL file and changing the data
type of the two input parameters from xsd:string to xsd:anyType - this
"encourages" the SOAP toolkit to include the actual type in the request
parameters, and as the rdWsMethod.vbs file conveniently passes all
parameters as strings, then the correct xsi:type="xsd:string" attribute
is included on both parameters and Google is happy!
This workaround doesn't work for the Search method, as it has int
and boolean parameters as well as string parameters, and the Google
code does not know how to convert the strings passed in to the
appropriate data types!
I suggest you look at the library you are using and see if you can
force it to send the parameter types in the call - if that is also your
problem.
Hope this helps.
Regards,
Ian.