Quantcast
Channel: SCN : All Content - SAP Enterprise Portal
Viewing all articles
Browse latest Browse all 3876

Dynamic System Resolution: seems like my method is not called

$
0
0

Dear colleagues,

 

I have a problem using Dynamic System Resolution in an SAP NetWeaver Portal.

 

In SAP NetWeaver Developer Studio, I've developed a class called MyAliasMapping:

 

package com.mycompany;

import com.sap.security.api.IGroup; 

import com.sap.security.api.IGroupFactory; 

import com.sap.security.api.IUser; 

import com.sap.security.api.UMException; 

import com.sap.security.api.UMFactory; 

import com.sapportals.portal.prt.component.IPortalComponentRequest; 

import com.sapportals.portal.prt.component.IPortalComponentResponse; 

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

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

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

 

public class MyAliasMapping implements IDynamicSystemService, IService {  

 

  private IServiceContext mm_serviceContext;  

 

  public void init(IServiceContext serviceContext) {  

    mm_serviceContext = serviceContext;  

  }  

 

  public void afterInit() {  

  }  

 

  public void configure(IServiceConfiguration configuration) {  

  }  

 

  public void destroy() {  

  }  

 

  public void release() {  

  }  

 

  public IServiceContext getContext() {  

    return mm_serviceContext;  

  }  

 

  public String getKey() {  

    return KEY;  

  }  

 

  public String getAlternativeSystem(IUser user, String alias)  {  

    String system = "pcd:portal_content/com.mycompany.mycompany/com.mycompany.Z01";  

    return system; 

  }  

 

}

 

This class uses the interface IDynamicSystemService, here it is:

 

package com.mycompany;

 

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

import com.sap.security.api.IUser; 

 

public interface IDynamicSystemService

{

    public static final String KEY = "DynamicSystemResolution.dsr"; 

    public abstract String getAlternativeSystem(IUser user, String alias); 

}

 

And here's portalapp.xml of my project:

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

<application>

  <registry>

    <entry path="/runtime/alias.mappers/dsr" name="dsr_srv" 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="dsr_srv">

      <service-config>

        <property name="className" value="com.mycompany.MyAliasMapping"/>

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

      </service-config>

    </service>

  </services>

</application>

 

I've built the project and deployed it to the portal.

 

When I look at the registry in the portal, everything seems alright, there's the following node under ROOT/runtime/alias.mappers:

dsrjava.lang.String - DynamicSystemResolution|dsr_srv

 

I can also find my portal archive in Administration Console, everything looks okay.

 

But if I specify "dsr" in the "System" property of an iView, it throws an error. Moreover, it throws the VERY SAME error as if I specify some nonsense in the "System" property. In other words, I cannot even be sure that the portal registry node for "dsr" is analyzed.

 

I've followed the workflow of Dynamic System Resolution at http://help.sap.com/saphelp_nw70/helpdata/en/03/83d1413f389c39e10000000a155106/content.htm. But it doesn't help me. Is there any way to debug that method getSystemId or at least to test it (to launch it to see what it returns)?

 

Any help will be greatly appreciated (and points will be rewarded, of course) because I'm really stuck with that!


Viewing all articles
Browse latest Browse all 3876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>