Skip to Content
avatar image
Former Member

Portal Web Service

Hello,

I have a problem, can anyone help me ? Therefore I have a class which extends PageProcessorComponent, the shortly code is:

...

...

...

public class aClass extends PageProcessorComponent

{

private ......

........

........

public DynPage getPage()

{

return new MyDynPage();

}

public class MyDynPage extends JSPDynPage

{

public void doInitialization()

{

....

....

}

public void doProcessAfterInput()

throws PageException

{

....

....

}

public void doProcessBeforeOutput()

{

this.setJspName("a.jsp");

}

a business_methods;

other business method;

public void onNavigate(Event event)

{

....

....

}

}

}

These business methods has a Event type parameter.

For above class, I wish to create a Portal Service. With the SAP Netweaver Developer Studio's wizard I created a portal service and a properly interface for "access" the business method from the above class.

My questions are: How could access the business method by the interface or how could define the business method in the interface. These methods are already "implemented".

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 19, 2004 at 02:57 PM

    To access the service you need a Sharing Reference similar to the one for htmlb in your portalapp.xml file.

    <property name="SharingReference" value="htmlb,MyServiceApplication"/>

    In the java code that wishes to call the service you must first find the service and then call the method within it.

    MyService is = (MyService)PortalRuntime.getRuntimeResources().getService(MyService.KEY);

    result = is.MyMethod(arg1, arg2, ...);

    Add comment
    10|10000 characters needed characters exceeded