Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / migrate_plus / migrate_example_advanced / config / install / migrate_plus.migration.weather_soap.yml
1 # This migration demonstrates importing from SOAP/WSDL.
2 id: weather_soap
3 label: SOAP service providing weather.
4 migration_group: wine
5 migration_tags:
6   - advanced example
7 source:
8   # We use the SOAP parser source plugin.
9   plugin: url
10   data_fetcher_plugin: http # Ignored - SoapClient does the fetching.
11   data_parser_plugin: soap
12   # URL of a WSDL endpoint.
13   urls:
14     - http://www.webservicex.net/globalweather.asmx?WSDL
15   # The function to call on the service, and the parameters to pass. See
16   # http://www.webservicex.net/New/Home/ServiceDetail/56 for the XML structure
17   # of this feed - how CountryName is passed within the GetCitiesByCountry
18   # XML element.
19   function: GetCitiesByCountry
20   parameters:
21     CountryName: Spain
22   # Responses may be returned as an XML string, an object, or an array - specify
23   # the type of response here.
24   response_type: xml
25   # Looking at the XML response at http://www.webservicex.net/globalweather.asmx/GetCitiesByCountry,
26   # we see that the data items we want are within <NewDataSet><Table>.
27   item_selector: /NewDataSet/Table
28   # For each field, 'name' is the source property name to be used in the process
29   # steps below, 'label' is optional (to document the property), and selector
30   # is an xpath (-like, for array and object returns) string relative to the
31   # item_selector for retrieving that data value.
32   fields:
33     -
34       name: Country
35       label: Country
36       selector: Country
37     -
38       name: City
39       label: City
40       selector: City
41   # 'ids' tells us what source property ('City') holds the unique identifying
42   # value for each imported item, and what schema type to use to hold that
43   # value in the migration map an message tables.
44   ids:
45     City:
46       type: string
47 process:
48   vid:
49     plugin: default_value
50     default_value: migrate_example_wine_varieties
51   name: City
52 destination:
53   plugin: entity:taxonomy_term
54 migration_dependencies:
55   required: {}
56   optional: {}