User Guide: Integration > Advanced Configurations > Collection Support > Collection Support in Request Input for SOAP
Collection Support
Collection Support in Request Input for SOAP
You can now map collections within your SOAP request to your application. If you want your collection to be displayed for certain iterations, you can also add a for loop
to your SOAP contract. IDE now supports n level nested collections as a part of the request template.
An example of a single level collection is as follows:
You can similarly have multiple nested collections and you can define a for loop for each of the nested collections. Ensure that each of the for loop has a unique identifier name. For example #foreach $<uniqueidentifier>
. Since Volt MX Studio parses the items and creates a service definition template using end of line logic for each for statement till for end of loop.
Scenario 1: If the input value for an element is not provided, you can include an exclamation mark “!” after the “$” (for example, <Bldat>$!Bldat</Bldat>
) to generate a collection that includes null value. For example: <Bldat></Bldat>
To avoid this empty
Scenario 2: If a Key is missing in the input parameter, write the template in the following manner and past it in the request tab:
After you have structured your xml, do the following:
- Copy and paste the xml in the Request tab.
- Click Add. A row gets added to the table.
- Enter the value for ID. The ID should be the same as that of loop of the collection. For example if the loop is #foreach $items the corresponding ID should be items
-
Enter a Test Value.
Test Value is the value of the parameter that is used for testing the service. The test value for a collection could be of the form:
For an item whose value whose value is empty specify it as \[\].
- Select a value for Scope from the drop-down list. Scope denotes the scope of the parameter, if it is limited to request or a session.
- Set the value of the Datatype as collection.
- Select True or False for Encode. Specifies if the URL needs to be encoded or not
- If you need to delete a parameter row, select the parameter row you want to delete and click Delete. This action removes the parameter row from the list of service parameters.
- Navigate to the response pane and fetch the response.
Collection Support in Request Input for JSON
You can now map collections within your JSON request to your application.
If you want your collection to be displayed for certain iterations, you can also add a for loop
to your JSON input.
Volt MX Foundry Console supports multilevel (N level) nested collections as part of the request template.
Example of a simple single level collection is as follows:
Note that you have to change the datatype to collection in Volt MX Foundry Console for the added input parameter. To test, pass a simple single level JSON.
For example:
Note: For nested collections, please go through the SOAP documentation for collection.
Collection Support in Request Input for XML
You can now map collections within your XML request to your application.
If you want your collection to be displayed for certain iterations, you can also add a for loop
to your XML input.
Volt MX Foundry Console supports multilevel (N level) nested collections as part of the request template.
Example of a simple single level collection is as follows:
And you can pass an input collection with a test value:
Rev | Author | Edits |
7.1 | SD | SD |