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.
The service proxy eliminates following:
HTML5 forms can use following topologies to connect to the AEM servers.
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:
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.
Parameter |
Description |
activity |
Activity contains the events that trigger the request. Such as click, exit or change |
contextSom |
contextSom contains SOM expression of the object where events are executed. |
Template |
Template contains the template used to render the form. |
contentRoot |
contentRoot contains the template root directory used to render the form. |
Data |
Data contains bata bytes used to render the form. |
formDom |
formDom contains DOM of the HTML5 form in JSON format. |
packet |
packet is specified as form. |
debugDir |
debugDir contains the debug directory used to render the form. |
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.
Parameter |
Description |
Template |
Template used to render the form. |
contentRoot |
template root directory used to render the form. |
Data |
bata bytes used to render the form. |
formDom |
DOM of the HTML5 form in JSON format. |
submiturl |
The URL where data XML is posted. |
debugDir |
The debug directory used to render the form. |
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.