google API spell check with nusoap not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the code :
//--------------------------
include("nusoap.php");
$soapclient = new soapclient  
              ("http://api.google.com/search/beta2";);

$params = array('key' => 'google_key','phrase' => $_GET['q']);

$spellresult = $soapclient->call("doSpellingSuggestion", 
               $params,"urn:GoogleSearch", "urn:GoogleSearch");

print_r($spellresult);
//-------------------------------

prints true spell for $_GET['q'] = "profescor" as professor;

while for $_GET['q'] = "profesor" it returns error array 

as 


Array
(
    [faultcode] => SOAP-ENV:Server
    [faultstring] => Exception from service object: Internal error while
getting spelling suggestion
    [faultactor] => /search/beta2
    [detail] => Array
        (
            [stackTrace] => com.google.soap.search.GoogleSearchFault:
Internal error while getting spelling suggestion
	at
com.google.soap.search.GoogleSearchService.doSpellingSuggestion(GoogleSearchService.java:274)
	at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.soap.server.RPCRouter.invoke(RPCRouter.java:146)
	at
org.apache.soap.providers.RPCJavaProvider.invoke(RPCJavaProvider.java:129)
	at
org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:288)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at com.google.gse.HttpConnection.runServlet(HttpConnection.java:237)
	at com.google.gse.HttpConnection.run(HttpConnection.java:195)
	at com.google.gse.DispatchQueue$WorkerThread.run(DispatchQueue.java:201)

        )

)


please review it and thanks in advance if anyone have solution of it.

from 

akash.

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux