cancel
Showing results for 
Search instead for 
Did you mean: 

Authentication for Web service to be consumed in offline Adobe form

Former Member
0 Kudos

Hi All,

I am working with Webservice generated through ABAP( RFC function module exposed as webservice), This Webservice is to consumed in an Adobe Form.

Now, my requirement is to authenticate the user wishing to execute this webservice from an offline form.

I have seen a thread on this, but I have coupl eof questions on this:

1 .Is it possible to provide authentication i.e. pop-up of user ID and password for user credentials and then in turn executing the web service with this user credential in offline forms?

i.e. user should get a authenticaton pop-up and then web service should be executed with his credentials.

( We do not intend to store user id and PWD in SICF Log on data)

2. If we use no authentication for the webservice, which SAP user will be used to execute this service?

Any inputs are appriciated.

Regards,

Akshay Bhagwat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To authenticate the WebService we have two ways i.e.

1. If you donot maintain any Logon Data in SICF ( for each and every node in the SICF TCode ) then while triggering the WebService, the Adobe Form will generate the Pop-Up message automatically and there you can specify the Logon details (as it will ask for UserId and Password ), it will trigger for three times if you only if you enter wrong credentials.

2. You design the Layout with two more fields i.e. UserId and Password, and by using the JavaScript of FormCalc Scripting you can call the WebService.

For Eg. if you are having some WebService URL then at the last you need to concatenate with the "&sap-user=username&sap-password=password", with this URL by writing the JavaScript or FormCalc coding in the Layout to a button or some field you can authenticate the WebServive.

Note: This is only the Basic Authentication

Regards

Pradeep Goli

Former Member
0 Kudos

Hi Pradeep,

Regarding the solution u've given for Prompt of the popup for credentials,

We've started getting the popup now, but there are certain issues like:

1. We tried the same application at different PCs its behaviour is not consistent, At some PCs it prompts for Credentials, somewhere it does not, is it something related to Adobe Reader version

Any clues on this would be really helpful..

Thanks,

Amita

Former Member
0 Kudos

Hi Pradeep,

Any hints on Amita's question? Our problem is same..

Regards,

Akshay

Former Member
0 Kudos

Hi,

As I said in the First point i.e. we should not maintain any Logon Data for any node present in the SICF TCode for the Service that is being created in any system.

Regards

Pradeep Goli

Former Member
0 Kudos

Hi,

we have checked the same, there is no log on data maintaine din SICF.

However, trial of the same application at different PCs, its behaviour is not consistent, At some PCs it prompts for Credentials, somewhere it does not.

Regards,

Akshay

"we should not maintain any Logon Data for any node present in the SICF TCode "

Do u mean to say "Any" means we should not have log on data in web services other than the one which we are using also??

Edited by: Akshay Bhagwat on Mar 20, 2009 10:36 AM

Former Member
0 Kudos

Hi,

The problem may be with the Adobe Reader version but I am not sure.

We may have to buils a workaround for this solution, I am trying to resolve the issue but got struck at some point. We need to have a custom dialog box, but here the dialog box takes only one input at a time(as per my knowledge).

I found one method, but here we need to write this code two times as userid and password are being displayed in two dialog boxes where I think its not that much efficient way, the function is.:


app.response(cQuestion,cTitle,cDefault,bPassword,cLabel); 

Input Arguments for the app.response() function:

cQuestion: Main Response Box text

cTitle: Window Title of Response Box

cDefault: Initial value of input text box, also value returned if no changes are made

bPassword: Causes text entered into input box to be obscured by asterisks (*)

cLabel: Short text string placed in front of input box

Usage Eg;


var cRtn = app.response ({
   cQuestion:"Enter the password for your digital signature",
   cTitle:"Custom Digital Signature Script",
   bPassword:true, //If you want the input type as password field set to true else false
   cDefault: global.cLastPswd,
   cLabel:"Password"});

Besides this we also have custom dialog boxes with the function "app.execDialog()"

(by this function we need to look to have two inputs at a time, working on this):


// Dialog Definition
var oDlg =
{
  description:
  {
   name: "Test Dialog",
   elements:
   [
      {
         type: "view",
         elements:
         [
            {
             name: "Enter your name:",
             type: "static_text",
             },
             {
             item_id: "usnm",
             type: "edit_text",
             char_width: 15
             },
             {
             type: "ok_cancel",
             },
           ]
        },
     ]
  }
};

// Dialog Activation
app.execDialog(oDlg);

Reference: Acrobat Users Community Tutorials

[Custom Dialog Boxes|http://www.acrobatusers.com/tutorials/2006/popup_windows_part5]

[The Response Box|http://www.acrobatusers.com/tutorials/2006/popup_windows_part2]

Regards

Pradeep Goli

Edited by: Pradeep Goli on Mar 20, 2009 5:40 PM

Former Member
0 Kudos

Thanks for inputs. will check on this front.

Answers (0)