Now that we have defined all of the fields for our dynamic array, we can test the Web Service and display the SOAP or REST request and response.
The specified Web Service displays in the Editor panel.
The tab is populated with the Service Name, Service Port, any operations or resources defined on the service and the auto-generated Request for the current operation or resource. In addition, since this operation or resource is a cataloged subroutine, the Name, Namespace and Type for the subroutine display in the Operations table.
The input arguments for the Web Service display in the Operations table.
The Dynamic Array Editor displays with a table based on the inventory.request dynamic array definition. In this case, customer.id, item.id, and location.id.
In our case, we have added 2 item.id multivalues (DVD-200 and DVD-201) and 2 location.id subvalues (IRVINE and SAN JOSE) to the request. Note that in this request, we are asking for:
The following image illustrates our example. The lower panel displays the resulting XML data that will be included in the Web Service SOAP request.
The request is executed and the response displays in a new tab. The following image illustrates the SOAP response for our dynamic array.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/enveloper> <soapenv:Body> <mvtkws: check-i nv_subResponse xmlns:tigws="http://www.rocketsoftware.com/namespaces/ws/mywebservice" xmlns:xs="http://www.w3.org/2001/xmLschema" xmlns:xsi="http://www.w3.org/2001/xmLschema-instance"> <inventory.response> <customer.id>123</customer.id> <items> <item.id>ovo-200</item.id> <description>The office - special edition</description> <list.price>25.99</list.price> <sale.price>19.99></sale.price> <inventory> <location.id>01</location.id> <location.name>Irvine</location.name> <quantity.on.hand>4</quantity.on.hand> </inventory> </items> <items> <item.id>ovo-201</item.id> <description>The office - season one</description> <list.price>25.99</list.price> <sale.price>19.99</sale.price> <inventory> <location.id>02</location.id> <location.name>San Jose</location.name> <quantity.on.hand>3</quantity.on.hand> </inventory> <inventory> <location.id>01</location.id> <location.name>San Jose</location.name> <quantity.on.hand>5</quantity.on.hand> </inventory> </items> </inventory.response> </mistkws:check-inv_subitesponse> </soapenv:Body> </soapenv:envelope><
This SOAP response indicates the following information: