cancel
Showing results for 
Search instead for 
Did you mean: 

Login to a legacy system by taking authentication from LDAP

Former Member
0 Kudos

Hi all,

We are using SAP PI 7.3.

I have requirement change. The requirement was that the third party system(JAVA system) has a login interface. In that when they login into their application by providing username and password, they want the same to be authenticated using LDAP and if username & password validated, then the application allows the user to login.

The scenario is implemented as a SOAP to RFC scenario. In that we have provided a PI WSDL to users which they have consumed in their JAVA system. This WSDL takes username, password as input. A UDF is created using JAVA code to authenticate LDAP. This UDF takes input as username and password and return true if login successful and exception if login fails due to the certain exception.

The remote function module code that works in ECC passes the response a true if login is successful and passes fault exception as ‘Invalid user Credentials’ in case of any exception sent by UDF.

Now the client requirement is that when LDAP fails to authenticate they need the exact exception to be passed in fault exception rather that one hardcoded message Invalid User credentials.

This is possible by mapping the output of UDF to response of webservice. But the client wants that same in fault exception and not in response.

But in exception we can only pass hardcoded texts and not the dynamic ones. The client is also telling if we can remove ECC from between as ECC is not doing anything processing part but only passing the exceptions/response which JAVA code in UDF generated.

What is the work around for this scenario. I am mainly stucked in passing the output of UDF as fault exception.

Please suggest any other option/ work around for the same.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Venkat,

Thanks for the reply.

But I am not able to understand what are you trying to tell.

Let me explain what i am trying to configure:

Request message type of SOAP -> Request of RFC

Username & password is mapped to the request of RFC(Auth status). UDF is used which passes true to the Auth status field if authentication is successful to LDAP else passes False or any other exception.

Response of RFC -> Response message type of SOAP.

Auth status of RFC is mapped to Auth status of response MT which is gain either tru/False.

Exception of RFC -> Fault MT of SOAP

If Auth Status not true then in RFC coding is done in such a way that it will pass Invalid user credentials in fault exception.

But client requirement is to pass exact exception generated by UDF in Fault exception.

The Output of UDF can be mapped to the Response MT but client wants the output to be mapped to the Fault exception if it is not true.

Kindly Suggest

Former Member
0 Kudos

Hi,

Try the below.

Source -->PI-->Source

Ask the source system folks to create one more method for fault exception.

Below is the sample wsdl which uses fault for your ref

case1:If you want to send using fault exception for +ve or -ve case then normal mapping(1 to 1)

case2:If you want to +ve with one operation and -ve with fault then use (1 to 2) mapping .

Regards

Venkat