Skip to Content
author's profile photo Former Member
Former Member

GoogleSearch web service

Hi..

I am trying to consume d web service provided by Google.I hav implemented d following code in doContent():

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

IGoogleSearch client=(IGoogleSearch) PortalRuntime.getRuntimeResources().getService(IGoogleSearch.KEY);

GoogleSearchResult result =client.doGoogleSearch(key,"portal",0,10,false,"",false,"","","");

String r=result.toString();

response.write(r);

}

I get d output as follows:

com.company.global.enterprise.portal.wsdl.webservices.service.Google.GoogleSearchResult@1a53ff

I've converted d GoogleSearchResult object to String ;but it doesn't giv the desired output.What shud b done to get the desired output?

Any help wud be appreciated.

Thanks

M.Subathra

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 11:38 AM

    Hi Subathra,

    you may check if the google search returns a result at all. (e.g. by checking the size of the array which is returned by result.getResultElements()).

    regards,

    Martin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.