15
SOAP and Web Services
Workflow Applications
Workflow Applications
One major impact that Acrobat JavaScript support for SOAP has is on collaboration
workflows. A SOAP-based collaboration server can be used to share comments remotely via
a Web-based comment repository. Through the DNS Service Discovery support, it is
possible to enable dynamic discovery of collaboration servers, initiation workflows, and RSS
feeds that can provide customized user interfaces, via XML, directly inside of Acrobat 7.0.
In addition, it is possible to deploy Web-based JavaScripts that always maintain the most
updated information and processes, and to connect to those scripts via form field actions
that invoke web services.
In the following example, a form is submitted to a server using a SOAP-based invocation:
// Populate the content object with form and SOAP information:
var location = "http://adobe.com/Acrobat/Form/submit/"
var formtype = location + "encodedTypes:FormData";
var content = new Array();
for(var i = 0; i < document.numFields; i++) {
var name = document.getNthFieldName(i);
var field = document.getField(name);
content[i] = new Object();
content[i].soapType = formtype;
content[i].name = field.name;
content[i].val = field.value;
}
// Send the form to the server:
SOAP.request({
cURL: cURL,
oRequest: {
location + ":submitForm":
{
content: content
}
},
cAction: location + "submitForm"
}
260
Acrobat JavaScript Scripting Guide