In SAP NetWeaver Developer Studio, you have created a portal application and portal service with the Portal Application creation wizard.
The wizard produces a public interface (in the src.api folder) and private implementation class (in the src.core folder).
The following procedure assumes that you have created the following:
Portal Application: myApp
Portal Service:
Interface: ImyService
Implementation: myService
A portal service can be accessed from a Web Dynpro application if it implements the IServiceRemoteSafe interface and registers with the service factory.
To the class declaration of the implementation class myService , add IServiceRemoteSafe to the interfaces the class implements.
The following is the signature for the implementation class:
public class myService implements ImyService, IServiceRemoteSafe {}
Add a <registry> section to the portalapp.xml , inside the root <application> tag. To this section, add an <entry> element with the following attributes:
path: /com.sap.portal.fpn.api.servicegateway/services/<full name of service>
name: full name of service
type: service
The following is the <registry> section for the myApp application:
<registry> <entry path="/com.sap.portal.fpn.api.servicegateway/services/myApp.myService" name="myService" type="service" /> </registry>
Deploy the application.
The service can now be accessed from a Web Dynpro application.