Show TOC Start of Content Area

Object documentation Services  Locate the document in its SAP Library structure

A portal service provides processing that is not bound to a specific request. A service can be called by a component or by other services.

For example, the portal provides a transformation service for transforming XML, as well as the EPCF service for creating JavaScript in an iView that enables client-side eventing between iViews.

A service cannot be personalized.

Creating a Portal Service

Create a portal service by doing the following:

...

       1.      Write a Java class that implements IService. The class includes the IService methods, such as init() and destroy(), as well as custom methods that you want to expose through the service.

You generally create a Java class for a service with the help of the portal plug-in to NetWeaver Developer Studio, which creates generic implementations of the standard IService methods. For more information on the plug-in, see SAP NetWeaver Developer Studio Plug-In.

       2.      Add the Java class to a PAR file.

For more information on PAR files, see PAR Files.

       3.      Modify the deployment descriptor (portalapp.xml file) of the PAR file to provide information about the service, such as the name of the service, the name of the implementing class and configuration properties.

Configuring Services

A service can define configuration properties, which appear in the service configuration screens of the portal.

To define a property, add a property to the <service-profile> section of the portalapp.xml file of the portal archive.

For example, the following adds the property myProperty to the service myService:

<services>

    <service name="myService">

        <service-config>

            <property name="className" value="myService"/>

        </service-config>

        <service-profile>

            <property name="myProperty" value="ABC"/>

        </service-profile>

    </service>

</services>

An administrator can then configure the property in the service configuration area of the portal, as described in Service Configuration.

Note

If a service has no properties, it does not appear in the Service Configuration page.

End of Content Area