N
nobody
Hi, when I run the following code I get
"Exceptionjava.lang.NullPointerException"
Any idea what I did wrong?
Also, I'm using WSDL file to access the web service, not external
library. I'm using Eclipse environment to develop web service client.
<code>
public static void main(String[] args) {
System.out.println( "hello" );
GoogleSearchService service = new GoogleSearchServiceLocator();
try
{
GoogleSearchPort google = service.getGoogleSearchPort();
String key = "my key....";
String search = "Exchange rate";
GoogleSearchResult result = new GoogleSearchResult();
result =
google.doGoogleSearch(key,search,
0, 10, true, "countryEN", false, "lang_en", "UTF-8",
"UTF-8");
System.out.println("Did you mean: " + result);
}
catch ( Exception e )
{
System.out.println("Exception" + e );
}
}
</code>
"Exceptionjava.lang.NullPointerException"
Any idea what I did wrong?
Also, I'm using WSDL file to access the web service, not external
library. I'm using Eclipse environment to develop web service client.
<code>
public static void main(String[] args) {
System.out.println( "hello" );
GoogleSearchService service = new GoogleSearchServiceLocator();
try
{
GoogleSearchPort google = service.getGoogleSearchPort();
String key = "my key....";
String search = "Exchange rate";
GoogleSearchResult result = new GoogleSearchResult();
result =
google.doGoogleSearch(key,search,
0, 10, true, "countryEN", false, "lang_en", "UTF-8",
"UTF-8");
System.out.println("Did you mean: " + result);
}
catch ( Exception e )
{
System.out.println("Exception" + e );
}
}
</code>