on 12-15-2005 11:28 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.