cancel
Showing results for 
Search instead for 
Did you mean: 

Package : com.sap.portal.dynamicsystem - Dynamic System Resolution

Former Member
0 Kudos

hi all

We are using EP 6.0 SP 13.

And i am implementing Dynamic System Resolution....

But i am unable to implement the InterfaceIDynamicSystemService.

Could anybody help me ????

Thanks

Kay

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You'll need to add this external jar as a reference:

com.sap.portal.ivs.api_dynamicSystemService_api.jar

which is located in the server directory.

Then your class should look like this:

package com.company.service;

import com.sapportals.portal.prt.service.IService;

import com.sapportals.portal.prt.service.IServiceContext;

import com.sap.portal.dynamicsystem.*;

import com.sap.security.api.*;

public class TestSystem implements IService, IDynamicSystemService {

public String KEY = new String("myDynamicSystem");

public String getAlternativeSystem(IUser myuser, String myalias) {

String sReturn = new String("");

if (myalias.equals("SAP_WebDynpro_XSS")) {

/* only switches system for testuser */

if (myuser.getName().equals("testuser")) {

sReturn =

"pcd:portal_content/mySystems/com.company.Unavailable";

} else {

sReturn =

"pcd:portal_content/mySystems/com.company.QA-WAS";

}

}

return sReturn;

}

/* other methods for Iservice are implemented here, such as init, afterInit, configure, destroy, release */

}

and the portalapps.xml like this:

<?xml version="1.0" encoding="utf-8"?>

<application>

<registry>

<entry path="/runtime/alias.mappers/SAP_WebDynpro_XSS" name="TestSystem" type="service"/>

</registry>

<application-config>

<property name="releasable" value="false"/>

<property name="startup" value="true"/>

<property name="ServicesReference" value="com.sap.portal.ivs.api_dynamicSystemService"/>

</application-config>

<components/>

<services>

<service name="TestSystem">

<service-config>

<property name="className" value="com.company.services.TestSystem"/>

<property name="startup" value="true"/>

</service-config>

</service>

</services>

</application>

When I first ran the wizard to create a portal service, I had a problem with the ITestSystem that it generated. So since this will not be called I pulled the KEY into the implementing class and got rid of the ITestSystem interface it created.

Hope this helps! If so, please award points.

Ray

Former Member
0 Kudos

Hi Ray,

I followed your logic. Still I have some issues.

Created iView and assigned system alias and trying to change in service.

It did not throw any exceptions but iView connects to assigned alias.

Any ideas?

Regards

Mark