Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error in SOAP client when executing behind firewall  RSS feed

Mohan Natarajan
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to connect to Google API, I get the following exception:
[SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket:; targetException=java.lang
.IllegalArgumentException: Error opening socket:]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(
at org.apache.soap.rpc.Call.invoke(
at GoogleClient.searchGoogle(
at GoogleClient.main(
The code I used is:
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", "");
System.getProperties().put("proxyPort", "80");
Call call = new Call ();
String encodingStyleURI = "";
call.setTargetObjectURI ("urn:GoogleSearch");
call.setMethodName ("doGoogleSearch");
Vector params = new Vector ();
params.addElement(new Parameter("key", String.class, "18hec2Mmfwq1qgLyw3weQyFbhIMZRsRA", null));
params.addElement(new Parameter("q", String.class, "Web Service", null));
call.setParams (params);
Response resp = call.invoke (urlGoogle,"urn:GoogleSearchAction");

I was able to connect to other sites, like and get a page, whereas not to this one. Please let me know what is wrong with this code.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!