Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Web service call from PDF

Avatar

Former Community Member

Hi All,

I need your help as i got an assignment where i suppose to call web service from PDF.

I do have Adobe live cycle server environment along with me.

I have created an sample orchestration in workbench where it does the some calculation and i use it as web service in PDF.

I have followed the below procedure to call web service in pdf using designer

1. Go to file

2. Click on the new data connection

3. then WSDL url

and complete the rest of procedure.

When i click on the invoke button web service get call it prompt me for username and password and pdf works fine

I dont want my web service to pop up any username and password when i click invoke button so i should embbed some certificates in pdf i guess.

How do i achieve it?

Guys do reply thanks in advance....

9 Replies

Avatar

Level 3
Level 3

By disabling security of process created in Adobe LIve Cycle you can achieve it.

To disable security of process login to Adminui-->Home->Services->Application and Services->Service Management->Click on the service for which u want to disable security-->Click Security tab--->Require callers to authenticate select no and save.

Thanks

Avatar

Former Community Member

Thanks Aks,

For your reply on this

I have tried using your method but no luck.

Whenever i tried to invoke web service then it popped me box for username and password.

I need to provide login credentials of adobe live cycle server and then service gets invoked.

I dont want to provide login credentials of Adobe live cycle server when calling web service.

As soon as click on the button service should call web service and perform its operation.

Regards

Abhishek

Avatar

Level 3
Level 3

Hi,

Make following two changes and then test:

Adminui-->Home->Services->Application and Services->Service Management->Click on the service for which u want to disable security-->Click Security tab--->

Requires Callers to authenticate-->NO

Specify Run As--> System

Thanks

Message was edited by: aks@lc

Avatar

Former Community Member

Hi Aks,

Thanks it is working now.

But when i tried for third party web service it is giving me an error saying couldn't post to http://www.webservicex.net/CurrencyConvertor.asmx?WSDL.

I dont know what is the issue with it.

Will you please reply on this if you have anything on it?

I guess something is related security poicy but i dont know exact what it is?

Few more question related to web service call

1. Is it free Adobe reader will not call a web service?

2. If i am trying for third party web service which may be having username and password then how do i call web service from reader without prompting username and pwd?

3. Is there any javascript available to call web service which required credentials?

4. How do i open wsdl file in live cycle workbench?

Thanks in advance.

Regards

Abhishek

Avatar

Level 10

Few more question related to web service call

1. Is it free Adobe reader will not call a web service?

        Answer: If you are using Adobe Reader, you need to apply Usage Rights (through Reader Extensions) to invoke any web service.

2. If i am trying for third party web service which may be having username and password then how do i call web service from reader without prompting username and pwd?

     Answer: With a little tweak, you can do this if you know the username and password for the external web service.

Create a LC process and invoke the external web service from it. In the WebService activity, you can mention the required username and password.

Now, invoke the LC process through SOAP from your PDF. This option will work without prompting the user with Login dialog.

Please note that if you don't set appropriate permission to invoke the LC process, it will still show you up a dialog to authenticate in order to invoke the LC process.

3. Is there any javascript available to call web service which required credentials?

      Answer: Yes, you can write JavaScript to invoke the web service with the supplied credential in the code.

The API reference link is mentioned below.

http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.p...

Go through the SOAP methods; you will find a request object which encapsules the oAuthenticate parameter where you can mention the username and password.

4. How do i open wsdl file in live cycle workbench?

    Answer: You can open the WSDL through a WebService activity. Drag an Web Service activity into a process and click on configure button. The first textbox is the WSDL URL field. Enter the WSDL URL and click load. You will find the WSDl content in the large text area.

Nith

Avatar

Former Community Member

Hi Nith,

Thanks for your clarification on my questions.

I am getting an error when i enter web service url in web browser. The error is "405 get not supported, This is SOAP service, use POST".

i do get wsdl file from client from which i provided in pdf during data connection. i can see input request and output response in it.

But when i tried to invoke it nothing happens i dont know what could be the issue?

Will you explain me the difference between wsdl url and wsdl file?

also if diference between get and post web service implementation in adobe designer.

Regards

Abhishek

Avatar

Level 10

"But when i tried to invoke it nothing happens i dont know what could be the issue?"

      - Do you have acrobat installed? or your form is Reader Extended (if used with Adobe Reader) ?

      - You must see the result after successful invocation.

      - You may also try to invoke the web service from other programming language (just to crosscheck the web service results)

Differences b/w WSDL URL and a WSDL file:

Both of them serves utter most same purpose. The URL is remotely located and the file can be saved to your local machine.

However they both targets to one or more webmethods running on a remote server.

One disadvantage of having local WSDL file is that, any changes to the webmethod prototype will not be synchronized; as a result, your invocations may fail.

SOAP / REST

SOAP based services cannot be called through HTTP GET operation as opposed to REST service (which allows GET).

If you enter Web Service URL, it will not return the result since it is just a GET call. You can only view the WSDL by typing the full WSDL URL.

for e.g http://your_web_service?wsdl  

Creating Data Connections in PDF to a Web Service will make POST. So that should work without HTTP 405 error.

Nith

Avatar

Former Community Member

Hi Nith,

Many thaanks to clarify few issue with web service.

I am facing some issue with my environment.

I could not able to create data connection with web service in live cycle designer as i am getting an error of "couldn,t post data to "wsdl url", Please check file".

when i am trying to load wsdl url in adobe workbench i am getting an error "Error in loading wsdl: www.webservicex.net".

Could you please help me out why such issue i am facing my environment.

Regards

Abhishek

Avatar

Level 3
Level 3

I think you have used Submit button that's why this error is coming.

Use execute button.

Thanks