cancel
Showing results for 
Search instead for 
Did you mean: 

Making Parameters Dynamic in AppIntegrator

former_member81750
Active Participant
0 Kudos

Has anybody been successful in creating a successful implementation of Chapter of 6 of "How to use the application integrator". I have looked at some other messages in the this forum asking the same question. No one seem to have an answer.

I have been trying to do this for the last 2 days still no luck. May be someone can help with their experience.

Thanks

Pankaj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Good luck in getting an answer. I still have yet to get one.

Former Member
0 Kudos

I've successfully done that just a few weeks ago,

do you have any specific questions?

@Eric: Look at your thread, you never answered again.

Former Member
0 Kudos

Ok, let's start without further questions.

All you have to do, is write a portal service that extends ICustomerParameterProvider, which is well described in the How to guide.

I just implemented one method: getParameter(IPortalComponentRequest request, String id)

id is the property key, that you want to provide dynamically. For example, if you want to change the value, entered for the property key "System", just ask for the id:

if(id.equals("System"))
{
   // provide a new system alias here
}

and return the String. For all property id's, that you don't want to provide dynamically, return null.

If null is returned, the default parameter entered in your iView profile is fetched and used.

Remark: Before version SP6, you have to place the following code in the service's afterinit method, in order to get the service registered after portal restarts.

try
{
 //first make sure to start the appintegrator
 Object o = PortalRuntime.getRuntimeResources().getService("com.sap.portal.appintegrator.application_integrator");
if (o==null)
{
  throw new UnsupportedOperationException();
}
Context context = PortalRegistry.getInstance();
context = (Context)context.lookup("com.sap.portal.appintegrator/customer_exits/parameter_provider");
context.rebind("system","SystemAliasProvider|SystemAliasProviderService" );
}
catch (Exception e)
{
  if(logger.isActive()) logger.severe(e, "afterInit failed");
}

-> where "system" is the provider's id you specified in the portalapp.xml, "SystemAliasProvider" is the portalapp's alias and "SystemAliasProviderService" is the name of your provider.

Hope that helps,

Karsten

former_member81750
Active Participant
0 Kudos

Thanks Karsten for sharing the code. I had written a service checked it on the portal and then wrote the message. I absolutely understand we are helping each other and no one should even ask a question without first trying themselves.

Anyway, what I am trying to do using this is slightly differs from what is described. I am not trying to replace an existing parameter like <System>. I am trying to do SSO to a website, which introduces a small session variable name-value pair, which is specific to the session. For example the FORM submit action url is

http://<server uri>?session=<session value>&userid=<user_id>&passed=<passwd>

Now in this <session value> is always unique and assigned by the target webserver in the first visit to the webpage containing the HTML form. So instead of replacing an existing variable I am introducing a new one.

Another thing that is not clear from HOWTO is, what value to provide in the "Customer Exit for ParameterProvider" in the iView. So far I am using the name of the service registered in the portal. So taking example of how to guide it would IDProvider.

Now to my environment. I am on EP SP7 on WAS 6.40 SP8 on oracle, so I don't know if I have to include the code you had shared. Initially when I wrote the service, first challange I faced was to include the libaray/jar containing the interface ICustomerParameterProvider in the build path. So I just copied the code from howto and created the interface in the project it self. I have uploaded my complete project(14kb) at the following URL if someone needs to look at it,

http://www.pnarula.com/files/ELMProvider.zip

My URL template in the iView looks like this

<System.protocol>://<System.server><System.uri>?session=<map_id1>&<Authentication>

I have even tried to put the session name value pair in the URL template for user mapping. In both case I get the following error

"Unable to process template '<System.protocol>://<System.server><System.uri>?trials=<map_id1>&<Authentication>', because 'map_id1' is an invalid terminal property of the context ''..

"

Sorry for writing a large text for this message. But I wanted to give the complete picture.

Pankaj

former_member81750
Active Participant
0 Kudos

bump

yuji_shimizu
Discoverer
0 Kudos

recall my msg

Message was edited by: Yuji Shimizu

Former Member
0 Kudos

Hi Pankaj,

Have you solved this problem ? I'm getting the same error

" an invalid terminal property of the context ''.."

If you have solved this problem please share the solution

Thanks

Ami

Former Member
0 Kudos

Hi Karsten,

I want to get the actual value of the System-Alias before I'm going to set a new one with this coding ...

if(id.equals("System"))

{

// provide a new system alias here

}

how can this be done ? I'm not a developer !

Reason: I got a few different Backend System ( CRM, SRM ); each with it's own WAS; if I want to use the BSP's via portal from outside ( the backendsystems are not public ! ) the browser want's to connect to the internal WAS; this is impossible ! so I need a function that checks if the access is from external/internal an the set's the System-Alias ( but not only for one System ... )

or is there an other way to do this ?

regards oliver