Skip to Content
author's profile photo
Former Member

Google Service Example

I have coded this, got my license key, ammended the code and deployed the par to the portal. I can run it and get the first screen up, but when I enter a search term and click on the button - I get an error. Looking at the logs the following few lines seem to say that it is looking for a service.

Caused by: java.lang.reflect.InvocationTargetException: com.sapportals.portal.prt.service.ServiceException: Service not found: Alias

com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Portal Component

Looking at the code the URL is called ALias (or is it alias1).

If I have to define a service - what type should I used?

Has anyone else got the google example service to work?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Apr 02, 2004 at 06:17 PM

    Chuck,

    The problem is that your java class is calling the alias name for your service which is not the word "Alias".

    In the MyGooglePage.java example file they list the line to get the service.

    I believe it is:

    IMyGoogleService googleService = (IMyGoogleService) PortalRuntime.getRuntimeResources().getService("Alias");

    This is defaulted to the word alias. You should change this to the Alias name listed in your portalapp.xml file for the Service wherever the getService("Alias") is called.

    Please let me know if the Google WebService example works for you after this change. I have run into a problem further on where i am getting a Class Cast Exception when it actually calls the doSearch method and wondered if anyone else is having this problem.

    -Erin

    Add comment
    10|10000 characters needed characters exceeded