Hello.
Yeah, you are correct, the file you have posted is in fact a "SOAP web service response file".
XML Mapper is a tool designed to help you convert ("transform") an XML file that contains data in a repeating pattern to a Delphi dataset data file.
To achieve this, XML Mapper expects you to have the XML schema (XSD file) representing the structure of the source XML file you want to convert into a Delphi dataset. XML Mapper is not designed to read or process web service response files, be it SOAP or REST. That is a task that you must do separately.
Now, let's take a look at your SOAP response file:
1. The SOAP response file is correctly formatted: it has an XML "Envelope" section with header data and an XML "Body" section with the actual payload.
2. In the XML "Body" section (payload), we can see first the XMLSchema of the response dataset:
3. Right after the XML Schema, we can see the actual XML dataset with its row data:
4. We can extract the XML Schema to a separate individual file, adding the same XML header as found in the SOAP envelope. Let's save it as "SOAP_Dataset_Schema.xsd":
5. By the same token, we can extract the XML dataset to a separate individual file, again adding the same XML header as found in the SOAP envelop. Let's save it as "SOAP_Dataset.xml":
6. Open the XML Schema file ("SOAP_Dataset_Schema.xsd") in XML Mapper:
7. Create the "transformation" file:
a) Right click on the schema panel and click on "Select all"
b) Right click on the schema panel and click on "Create Datapacket from XML"
c) Click on the center button "Create and Test Transformation"
d) The test transformation window pops up with sample transformation data
8. Load and process the XML dataset (“SOAP_Dataset.xml”):
a) Click on the “Open file” toolbar icon of the “Test transformation” window
b) Select and open the “SOAP_Dataset.xml” file
c) XML Mapper will load and transform the XML dataset
d) The data will be shown in the “Test transformation” window in a DBGrid with a TClientDataSet as the source
I hope this example can guide you on what XML Mapper can do and what you need to do on your own to use it properly.
If you have further doubts please let us know.
Thanks,
Miguel