From 3789e505101fe2b008a2a7a7bd3c5cc22160654f Mon Sep 17 00:00:00 2001
From: Mike Ryan <mikeryan@virtuoso-performance.com>
Date: Thu, 18 Aug 2016 10:23:53 -0500
Subject: [PATCH] Issue #2786281 by mikeryan: Flesh out SOAP example contents

---
 .../migrate_plus.migration.weather_soap.yml      | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/migrate_example_advanced/config/install/migrate_plus.migration.weather_soap.yml b/migrate_example_advanced/config/install/migrate_plus.migration.weather_soap.yml
index da425215..ae2ad03a 100755
--- a/migrate_example_advanced/config/install/migrate_plus.migration.weather_soap.yml
+++ b/migrate_example_advanced/config/install/migrate_plus.migration.weather_soap.yml
@@ -9,12 +9,23 @@ source:
   data_parser_plugin: soap
   # URL of a WSDL endpoint.
   urls: http://www.webservicex.net/globalweather.asmx?WSDL
-  # The function to call on the service, and the parameters to pass.
+  # The function to call on the service, and the parameters to pass. See
+  # http://www.webservicex.net/New/Home/ServiceDetail/56 for the XML structure
+  # of this feed - how CountryName is passed within the GetCitiesByCountry
+  # XML element.
   function: GetCitiesByCountry
   parameters:
     CountryName: Spain
+  # Responses may be returned as an XML string, an object, or an array - specify
+  # the type of response here.
   response_type: xml
+  # Looking at the XML response at http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry,
+  # we see that the data items we want are within <NewDataSet><Table>.
   item_selector: /NewDataSet/Table
+  # For each field, 'name' is the source property name to be used in the process
+  # steps below, 'label' is optional (to document the property), and selector
+  # is an xpath (-like, for array and object returns) string relative to the
+  # item_selector for retrieving that data value.
   fields:
     -
       name: Country
@@ -24,6 +35,9 @@ source:
       name: City
       label: City
       selector: City
+  # 'ids' tells us what source property ('City') holds the unique identifying
+  # value for each imported item, and what schema type to use to hold that
+  # value in the migration map an message tables.
   ids:
     City:
       type: string
-- 
GitLab