Table of Contents

Search

  1. Preface
  2. Overview, Downloading, and Installing
  3. Administration API
  4. Identity Service API
  5. Screenflow Programming and SDK
  6. ActiveVOS WSHT API
  7. Embedding Request Forms in Standalone Web Pages
  8. XML-JSON for Process Central

APIs, SDKs, and Services

APIs, SDKs, and Services

ActiveVOS XML and JSON Bindings for Services

ActiveVOS XML and JSON Bindings for Services

Some AJAX-based form submit scripts that support file upload expect the return
content-type
to be
text/html
(instead of
application/json
) because of the way scripts target iFrames. In these cases, you specify parameter
responseContentType=text/html
. If the
responseContentType
IS present, Process Server uses the value defined by the parameter as the response content-type instead of the default
application/json
.
A few AJAX file upload scripts such as the
jQuery Forms Plugin
(see
http://plugins.jquery.com/project/form/
) also require responses to
multipart/form-data
forms POSTs to be wrapped in a HTML element such as the
textarea
tag. Do this by using the
responseWrap
parameter. The value of this parameter should be the HTML element tag name.
The following shows HTML file upload form used by the jQuery Forms plugins, which requires the response to be returned wrapped in a HTML textarea tag with content-type head of
text/html
:
<form method='POST' enctype='multipart/form-data' action='http://localhost:8080/active-bpel/services/JSON/humantaskProcessDemoService'> <!-- JSON message payload in a hidden field named '_json' --> <input type="hidden" name="_json" value='{ "loanProcessRequest": {"xmlns" :"http:\/\/schemas.active-endpoints.com\/sample\/LoanRequest\/2008\/02\/loanRequest.xsd", "loanType" :{"$t":"Automobile"}, "firstName" :{"$t":"FileUploadJohn"}, "lastName" :{"$t":"Smith"}, "dayPhone" :{"$t":"2039299400"}, "nightPhone" :{"$t":"2035551212"}, "socialSecurityNumber":{"$t":"123-45-6789"}, "amountRequested" :{"$t":"15000"}, "loanDescription" :{"$t":"Application to finance the purchase of a Toyota Prius"}, "otherInfo" :{"$t":"Down payment is US$7500"}, "responseEmail" :{"$t":"john.smith@example.com"}}}' /> <!-- Force response content-type to text/html --> <input type="hidden" name="responseContentType" value="text/html" /> <!-- Return response wrapped in a textarea element --> <input type="hidden" name="responseWrap" value="textarea" /> File1: <input type="file" name="file_1" /> <br/> <input type="submit" value="Upload File"/> </form>

0 COMMENTS

We’d like to hear from you!