cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically change Adress and Credentials in SFAPI Adapter

tim_wernick2
Explorer
0 Kudos
261

Hello,
we are currently creating an integration where many configuration values will be passed via process direct to some process direct iflows. Some of the values are the api host and the api credentials for accessing the successfactors compound employee api.

Using a pure http adapter this works fine as long as we use the deprecated basic authentication. However switching to OAuth this fails with the following error:

java.lang.NullPointerException: while trying to invoke the method com.sap.it.nm.security.SecureStore.getCredentialTraits(java.lang.String) of a null object loaded from field com.sap.it.rt.scc.connectivity.service.principal.propagator.impl.NeoPrincipalToken.secureStore of an object loaded from local variable 'this'

So the idea was to switch back to the successfactors SFAPI adapter and use the CamelHttpUri header to dynamically change the api host. However this gets ignored as well.

Are there any ways to dynamically change the address as well as the credentials of the SFAPI adapter for the compound employee api?

kind regards

Tim

Accepted Solutions (0)

Answers (1)

Answers (1)

YuvrajKarwar
Explorer
0 Kudos

Hello Tim,

You can try below options

1.You can externalized parameters for host and Auth in same iflow where you are calling SF compound API.

OR

2.Check if headers allowed in your iflow where you are calling compound API

Hope this helps!

tim_wernick2
Explorer
0 Kudos

Hi Yuvraj,

sadly a simple externalization is not what helps here. The idea we have implemented so far is to have an Iflow which can be triggered via ProcessDirect and can be used by multiple iflows (call it trigger iflows) who all have their own configuration. This configuration includes the api host and api credentials name. The trigger iflows hand over the api host and the api credentials to the process direct iflow which then injects these values into the adapter. This works fine with the HTTP adapter as well with the SFSF OData adapter but fails with the SFSF SFAPI (Soap) adapter.