• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using SOAP to make http requests

Explorer ,
Jun 14, 2020 Jun 14, 2020

Copy link to clipboard

Copied

Hello everyone,

I want to write a folder level script using js in acrobat pro that does a POST request to a server. The server returns the response in JSON format. I want to use net.soap.request() function. I do not have any idea about soap. I learned about it using docs and stuff and found that it is an XML based messaging protocol and we can make the request to a soap endpoint using the above function. Now I am confused about how can I know that my endpoint is a soap endpoint and can't we make an HTTP request using the above function to any general endpoint?

Could anyone please provide some help regarding this.

Thanks in advance.

TOPICS
Acrobat SDK and JavaScript

Views

818

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 07, 2020 Aug 07, 2020

Copy link to clipboard

Copied

You mention that you learned about SOAP using docs? Which docs?   Everything you're asking is very well explained in the  Adobe Acrobat SDK JavaScript API Reference. 

 

Is this one of the documents that you used as a reference?

 

You'll be able to determine if a remote server is another SOAP endpoint  if you setup the request sychornously with  net.soap.wireDump.  You'll also need to define rules with the net.soap.request  and net.soap.response methods together.

 

This will allow for the XML message to write errors back to the JavaScript console (if any are found) and result values, to include exception errors if a network failure occurs.

 

And yes, you can make an HTTP request  to a variety of services.  See page 626 of the document I referenced.   You use net.discovery.queryServices. This, however, is limited to WSDL core language. See more about that here: https://www.w3.org/TR/wsdl/

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 07, 2020 Aug 07, 2020

Copy link to clipboard

Copied

LATEST

You are right that SOAP is a particular kind of web request. Acrobat JavaScript has a collection of Net.SOAP methods to use it. But Acrobat JavaScript also has a collection of Net.HTTP methods for use with other web requests. They are both documented in the same place, the Acrobat JavaScript API Reference.

You should note that, because these have the potential to send private info out of the user's computer, there are important restrictions on their use. In general you can't put something inside a document to make a request.

Not also that this is one of the advanced features of PDF that Adobe added to make money. You can't deploy these things to people who just have the free Acrobat Reader. Each person needs Acrobat (or you need to spend very big on other things).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines