HTML5 forms service proxy
- Topics:
- HTML5 Forms,Mobile Forms
CREATED FOR:
- Admin
- User
- Developer
HTML5 forms Service Proxy is a configuration to register a proxy for the submission service. To configure Service Proxy, specify the URL of submission service through request parameter submissionServiceProxy.
Benefits of Service Proxy
The service proxy eliminates following:
- HTML5 forms workflow requires opening up of the submission service “/content/xfaforms/submission/default” for the HTML5 forms users. It exposes AEM servers to a wider unintended audience.
- The service URL is embedded in the runtime model of the form. It is not possible to change service URL path.
- The submission is two-step process. To submit the form data, submission requires at least two journeys to server. Thus, increases load on the server.
- HTML5 forms send data in the POST request instead of PDF request. For workflow involving both PDF and HTML5 forms, two different methods of processing the submissions are required.
Topologies
HTML5 forms can use following topologies to connect to the AEM servers.
- A topology where AEM Server or HTML5 forms send data via POST to the server.
- A topology where proxy server sends POST data to the server.
HTML5 forms service proxy topologies
HTML5 forms connect to the AEM servers to run server-sided scripts, web-services, and submissions. The XFA runtime of the HTML5 forms uses Ajax calls on “/bin/xfaforms/submitaction” end point with various parameters to connect to the AEM servers. HTML5 forms connect AEM servers to perform following operations:
Execute Server-sided scripts and Web Services
The scripts marked to run on the server are known as server-sided scripts. The following table lists all the parameters used in Server-sided scripts and Web Services.
Submit data
On clicking the submit button, HTML5 forms send data to the server. The following table lists all the parameters that HTML5 forms send to server.
How the submit proxy works?
The submit service proxy acts as a pass through if the submiturl is not present in the request parameter. It acts as a pass-through. It sends the request to the /bin/xfaforms/submitaction end point and sends the response to the XFA runtime.
The submit service proxy selects a topology if the submiturl is present in the request parameter.
-
If AEM servers post the data, proxy service acts as a pass-through. It sends the request to the /bin/xfaforms/submitaction end point and sends the response to the XFA runtime.
-
If proxy posts the data, the proxy service passes all the parameters except submitUrl to the /bin/xfaforms/submitaction end point and receives xml bytes in response stream. Then, the proxy service posts the data xml bytes to the submitUrl for processing.
-
Before sending data (POST request) to a server, HTML5 forms verify connectivity and availability of the server. To verify connectivity and availability, HTML forms send an empty head request to the server. If the server is available, HTML5 form sends data (POST request) to the server. If the server is not available, an error message, Could’t connect to the server, is displayed. The advance detection prevents users from the hassle of refilling the form. The proxy servlet handles head request and does not throw exception.