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.
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.
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/
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).