Expand my Community achievements bar.

Using Web Service from LiveCycle PDF Dynamic Form.

Avatar

Level 8
I have developed Staff Attendance Sheet about 7 years ago using Microsoft Office Web Componenets Data Access Pages (OWC DAP).
See image below of the current report using OWC DAP:
Since we are moving our legacy systems to SAP, this report will have to be re-implemented using Adobe LiveCycle PDF which is connecting to Web Service over SAP Systems (since OWC does not connect to Web Service).
The SAP development team have developed the initial webservice which generates the required data.
I have developed the initial version of the LiveCycle PDF, which can be downloaded from this link:
The following is a screen snapshot of the LC Desinger Form:http://bit.ly/cxMK62

When the web service is executed from inside PDF the result looks as follows:

http://bit.ly/cacbCg

The webservice accepts the following required parameters:

1. Period: YYYYMM. User Specified Value.

2. Staff ID: 9999999. It must be supplied automatcially to the web service and it must be the Windows ID of the User Logged In to Windows
Domain.

Other parameters are optional.

Assumptions:

==========

1. I am not using any Adobe Forms Server Technology. I can use LiveCycle Desinger ES2 and LiveCycle Reader Extensions Server.

2. I can alse develop using .NET to get the Logged In User ID (Windows), generate the XDP from ASPX Page and attach the XML to the XDP.

3. We are using IE8 with Adobe Reader 9 Plugin (IE add-on) to display LiveCycle PDF inside IE.

Questions:

========

1. First time the webservice is executed, I will get a prompt to allow/deny execution of the webservice. This is a security issue here, becuase we do not want any user to know the link to the Web Service. How we can hide the link to the webservice and prevent any user from getting the link ?

2. How I can stop the Prompt to Allow/Deny execution to the Web Service for good ? As you know, users will get confused, and when we launch this PDF, it will generate a lot of calls to the Service Desk (more than 1000 users).

3. The Web Service uses Simple User Name/Password for authentication to run the webservice. I need to embed the User Name/Password inside
the PDF, and also prevent any user for getting them, how ?

4. I want to send the Staff ID Parameter to the Web Service Automatically which is the Logged In User ID (Windows). This is the same value of the "Login Name" which can be accessed using Acrobat JavaScript. But the problem, this script must be trusted, and it will be a long story. Any ideas how to implement this requirement using simple methods ?

5. If I manage to send the Staff ID Parameter to the Webservice automatically (Logged In User ID), also, I want to prevent the user from sending a different user ID, ie, prevent him from using Import Data to Form to specify a Different User ID for the Webservice Parameter. How ?

I appreciate your help if you have any ideas about the above.

Tarek.

25 Replies

Avatar

Level 1

Hi Tarek,

I'm facing the same problem as you, i wanna call a web service provided by SAP ByDesign, but the SOAP.request doesn't work if the cURL points to a local WSDL file, could you please let me know how to achieve it by XFA WSDL Connection? Many thanks!

Thanks&Best Regards,

Madeleine

Avatar

Level 8

Hi Madeleine,

Sure I will try to help you. As a matter of fact, using XFA WSDL Connection is 100 times easier than SOAP.request. It has been quite some time I am not working with this so you have to start, and if you have specific problem, then give me as much details as possible.

You can start by reading this thread carefully, use public web services as a start, and check other samples how to connect PDF Web Service.

Tarek.

Avatar

Level 1

Hi Tarek,

Thank you for your reply! I tried to call a web service (provided by SAP ByDesign) in SAP interactive form.

First, i created a DataConnection which gets data description from WSDL File, and set it to "Requires Message-Level Authentication".

And then drag an drop the request&response elements and the request button from data view to design view.

When i click the request button, a authorization window pops up, then i input the user&password, then an error occurred, which says:

Error attempting to read from file.

But i'm sure that the user&password and the parameters are correct because i tested it with soapUI.

Thanks&Best Regards,

Madeleine

Avatar

Level 1

Hi Tarek

And i tried to call a public webservice http://www.webservicex.com/FinanceService.asmx?WSDL(no authorization needed) and succeeded.

Do you know any public webservice which requires user&pwd so i can try it out? Many thanks!

Best Regards,

Madeleine

Avatar

Level 8

Ok, goog progress.

Based on my own research, last time I tried to consume SAP Web Service which has User Name and Pwd, it did not work, and the reason is that you cannot store the credentials inside the XFA File for security reasons. I totally forgot the details, but I decided to try another route completely.

So, the only way I fixed this problem, is to build additional security layer by developing a wrapper using ASP.NET Web Service.

Inside ASP.NET Logic, I enforced Integrated Windows Authentication, to identify the user who is trying to consume the Web Service via the PDF File. Then, I executed custom authorization logic to allow/deny calling the web service. If authorized, I simply call the web service, and return the original type (proxy) of SAP Web Service, and it works like a charm.

If this sounds complicated, I will try to post the entire soruce code (ASP.NET VB) to help you build your own or reuse if you like.

Tarek.