I used to run many programs to query the google web service.
I wrote my programs from the WSDL file using gSoap(2.5.7).
But, I now face some errors when trying to query your webservice:
"No Deserializer found to deserialize a ':key' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'."
It may be due to some erros in my programs, but theses queries used to
be valid some days ago.
Does anyone meet the same problem?
Any suggestions to resolv it ??
Thaks !!
ddh
and I don't find any solution to this problem....
--dustin
ddh
here is mine:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="urn:GoogleSearch"><SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><ns1:doGoogleSearch><key>***hidden***</key><q>car</q><start>0</start><maxResults>10</maxResults><filter>true</filter><restrict
href="#_3"/><safeSearch>false</safeSearch><lr href="#_3"/><ie
href="#_4"/><oe href="#_4"/></ns1:doGoogleSearch><id id="_4"
xsi:type="xsd:string">latin1</id><id id="_3"
xsi:type="xsd:string"></id></SOAP-ENV:Body></SOAP-ENV:Envelope>
I'll try with "" for null parameters !
For example, the following code:
soap_out_std__string(soap, "key", -1, &a->key, "");
should be:
soap_out_std__string(soap, "key", -1, &a->key, "xsd:string");
And other fields sholud do like this.
Still not working for me :(
http://muffin.cias.osakafu-u.ac.jp/~matumoto/prog/google_gsoap_test.zip
Please note that soapC.cpp is modified(mentioned above).
I use gsoap-2.7.0. Check your gsoap version.
I have also compile the googe exmaple given by the GSoap 2.5.7
package... and the same error occurs :(
ddh
1. Updated the gsoap to the latest version 2.7.6a.
2. Regenerate the soap stub routines with the updated gsoap compiler.
3. Modified the generated soapC.c as qinf mentioned.
In soap_out_api__doGoogleSearch,
soap_out_xsd__string(soap, "key", -1, &a->key, "") is modified to
soap_out_xsd__string(soap, "key", -1, &a->key, "xsd:string"), and
soap_out_xsd__int(soap, "start", -1, &a->start, "") is modified to
soap_out_xsd__int(soap, "start", -1, &a->start, "xsd:int"), and so on.
4. Compiled the codes, run and congratulated myself.
Although these steps might not be efficient, they are effective. Thanks
qinf.
My problem in in ASP using MSSOAP30, same error.
Thanks!
Anyway, I am using MSSOAP.SoapClient via VB.
To fix this problem I've changed GoogleSearch.wsdl
Specifying the type as xsd:anyType makes the MSSOAP.SoapClient specify
the data type supplied via the code, which is apparently what Google
wants.
My definition of doGoogleSearch is now:
<message name="doGoogleSearch">
<part name="key" type="xsd:anyType"/>
<part name="q" type="xsd:anyType"/>
<part name="start" type="xsd:anyType"/>
<part name="maxResults" type="xsd:anyType"/>
<part name="filter" type="xsd:anyType"/>
<part name="restrict" type="xsd:anyType"/>
<part name="safeSearch" type="xsd:anyType"/>
<part name="lr" type="xsd:anyType"/>
<part name="ie" type="xsd:anyType"/>
<part name="oe" type="xsd:anyType"/>
</message>
Hope it helps you guys.