cancel
Showing results for 
Search instead for 
Did you mean: 

ECC-->SAP PI-->Successfactor Integration: Invalid SFAPI session

anu_patyath
Explorer
0 Kudos

Hello Experts,

   I am working on  EmployeeData Synchronization interface the content of which is predelivered from SAP.

I configured the interface and while testing

as first step I was able to retrieve the session ID from Successfactor,

but using the session ID retrieved from Successfactor cloud application when I am trying to upsert data in the second step  I am getting an error "Invalid SFAPI session".

How can I overcome this error?

I have done my research on the SDN and went through the blogs but for not much use.

I am sure about the content and the version being used by me as the correct one.

Has anybody seen this error and if yes how did you overcome the same?

Please let me know.

One point that I have to make is that since I was able to retrieve the session ID I did not install the certificates from Successfactors.

Is installing the certificates mandatory and if yes which step is this being referred?

Any help is really appreciated.

Anu Patyath

Accepted Solutions (0)

Answers (4)

Answers (4)

anu_patyath
Explorer
0 Kudos

Dear all,

   Just wanted to close this thread. the interface worked and is working end to end without an issue.  I was not able to make it work using SOAP UI as there was Dynamic addition of the Session ID to the message and each time i tried with SAP PI workbench i received message "Invalid Session API" and with SOAP UI it did not work with the payload that got generated from the WSDL. You have to provide the proper Payloads in SOAP UI to make it work i believe.

Thanks Praveen. One thing i noted was that  its not mandatory  to install the Successfactor certificates in PI system.

Thanks Konert. If you could provide few steps on how you tested with SOAP UI it might be helpful for someone else.

Former Member
0 Kudos

Hi Anu,

Can you please advise what steps did you take to make it work end to end? We are having exactly same issue. Please advise.

Best Regards

Nidhi

anu_patyath
Explorer
0 Kudos

Hello Nidhi,

    I hope you are using SOAP AXIS adapter here.

Try the following

1)     First of all you need to maintain the right login information in ECC- It includes the Company ID, username and Password. This should be done by the functional consultant, if not ABAP team should have access to SPRO to maintain this.

2) You need to use the right URL. The URL is specific to each data center and please check accordingly with Successfactor consultant on the URL to be used.

3) you need to use 2 different channels.The channel that you use for Login should be different from the one that you use for upsert/logout etc.

I hope this helps.

Thanks

Anu

manikandan_shanmugam3
Active Participant
0 Kudos

Hi Anu,

Can you please elaborate about the two channels.

I am using single SOAP Channel but getting response as Invalid SFAPI Session!.

Please share ID Configuration. I am using ICO due to single stack system.

Regards,

Mani

anu_patyath
Explorer
0 Kudos

Hello Manikandan,

    This is pretty straightforward. Look into ESR software components and check the communication channel templates in them for the Login channels and the others.

You will be able to make out.

Former Member
0 Kudos

Hi Anu,

Can you confirm what was the Version OR Content file name that was imported into your PI ESR.

We have used SP9 Version of Content with file name SFIHCM0160009_0-10011784.ZIP.

Alim

anu_patyath
Explorer
0 Kudos

@Praveen and Heiko,

Thanks for your replies. Let me add more details to it.

I have configured the scenario using Process integration scenario "EmployeeDataSynchronization" predelivered by SAP.

I have used the channel templates  "SFSF_Soap_Adapter_Axis_Login_Response" for login and

"SFSF_Soap_Adapter_Axis" for other operations as advised.

When i trigger the Login Proxy it makes a successful connection to Successfactors and get back a Login Response with session ID and time till which session ID will be active, but then when the upsert operation is called it returns me a response conveying INVALIDSFAPI session.

This really confuses me.

Two things i can think of is that i haven't installed the Successfactor certificates, but does that matter? If it matters why was i able to retrieve a session ID when i triggered my Login operation proxy?

Second thing is that What would be the length of session ID? will it be 32 characters or 43 characters? i am getting something like 32 characters followed by a dot and then another 9 characters. Is this a standard behavior?

Eagerly waiting for your responses.

Thanks and Regards

Anu Patyath

Former Member
0 Kudos

Have you checked the SFAPI-Log in SuccessFactors?

You get an "Invalid SFAPI session" when either the login failed or the sessionid wasn't passed properly to the upsert request.


Did you use the channel templates? Be aware to have the correct module configuration and mapping.

praveen_sutra
Active Contributor
0 Kudos

Hi Anu,

Please check the respective interface determination.

it might be blank. You need to associate appropriate operation mapping.

Actually the issue is that the session id is attached properly causing the issue.

hope this helps.

thanks and regards,

Praveen T

anu_patyath
Explorer
0 Kudos

@Praveen and Heiko,

Thanks for your replies. Let me add more details to it.

I have configured the scenario using Process integration scenario "EmployeeDataSynchronization" predelivered by SAP.

I have used the channel templates  "SFSF_Soap_Adapter_Axis_Login_Response" for login and

"SFSF_Soap_Adapter_Axis" for other operations as advised.

When i trigger the Login Proxy it makes a successful connection to Successfactors and get back a Login Response with session ID and time till which session ID will be active, but then when the upsert operation is called it returns me a response conveying INVALIDSFAPI session.

This really confuses me.

Two things i can think of is that i haven't installed the Successfactor certificates, but does that matter? If it matters why was i able to retrieve a session ID when i triggered my Login operation proxy?

Second thing is that What would be the length of session ID? will it be 32 characters or 43 characters? i am getting something like 32 characters followed by a dot and then another 9 characters. Is this a standard behavior?

Eagerly waiting for your responses.

Thanks and Regards

Anu Patyath

praveen_sutra
Active Contributor
0 Kudos

Hi Anu,

I agree you would have configured using Process integration scenario but you still can make changes in configuration scenario.

Please check if you have right interface determination in the configuration scenario for the interface for which issue u are facing..

I faced this issue with multiple clients..

for answering ur second question

please look into this blog.

hope this helps.

thanks and regards,

Praveen T

anu_patyath
Explorer
0 Kudos

Hello Praveen,

   Yes i did check that.

It is SFSFUserUpsertRequestConfirmation_Out_to_SFSFUserUpsertRequestConfirmation_In and it is fine.

I have already went through the helpful and informative blog you had written and configured and i always keep that as reference.

The only thing i havent done as per your blog is the installation of certificates.

I am still doubtful whether this is really needed as i was able to connect to the URL and retrieve the session ID.

Can anybody help me on this?

Thanks

Anu.

praveen_sutra
Active Contributor
0 Kudos

hi Anu,

I am not sure if it works fine without certificate installation.

But would like to know if the inbound message payload and the message after mapping if there is any change.

The session id is handled in a specific way.

Alternately please try to use SOAP UI and try sending request using it from PI system.

That will give you an idea if its because of certificates.

thanks and regards,

Praveen T

anu_patyath
Explorer
0 Kudos

Hello Praveen,All,

    Just wanted to update you on the progress and look for a possible help.

We tried an end to end testing from our SAP system and were able to connect, retrieve session ID, perform the upsert operation(although response was NO_PERMISSIONS_EXCEPTION) and perform the Logout.

From PI perspective alone message delivery was fine.

The exception I believe is due to the service user having not enough authorizations. I will get back on this after we test further.

Regarding SOAP UI testing:

I was able to perform login from SOAP UI and get back session ID, but received "Invalid SFAPI session" again even in SOAP UI. You have mentioned that the session ID is handled in a specific way.

Could you please provide more light on it?

I can see that the UDF is setting up the session ID dynamically into the header of SOAP envelope

Also could you please provide how the SOAP Request structure would look like with the Session ID. I strongly believe that there is some issue with the way i am creating my SOAP structrue to perform the upsert operation.

Thanks for your help.

@All,

Please let know if any of you have performed the Upsert operation from SOAP UI to successfactors and if yes please provide the sample structure.

Former Member
0 Kudos

First of all, you should get it running with SOAP UI:

Please make sure, you got those steps right behind each other:

  1. login
  2. upsert
  3. logout

The important step is to set "Main HTTP session":

You can use the payloads for login, upsert and logout as they are generated by SOAP UI when importing the WSDL.

e.g. upsert:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:sfobject.sfapi.successfactors.com">

   <soap:Header/>

   <soap:Body>

      <urn:upsert>

       <urn:type>User</urn:type>

       <!--1 or more repetitions:-->

       <urn:sfobject>

       <urn:upsert>

       <urn:type>User</urn:type>

       <!--1 or more repetitions:-->

       <urn:sfobject>

            <urn:type>User</urn:type>

            <urn:type>User</urn:type>

            <urn:status>active</urn:status>

            <urn:externalId>testuser</urn:externalId>

            <urn:username>testuser</urn:username>

       </urn:sfobject>

     <urn:processingParam>

          <urn:name>sendWelcomeMail</urn:name>

          <urn:value>true</urn:value>

     </urn:processingParam>

     </urn:upsert>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>