Jump to content

Miguel Moreno

Members
  • Content Count

    9
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Miguel Moreno

  1. Miguel Moreno

    Updated XMLMapper

    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
  2. Miguel Moreno

    Updated XMLMapper

    Hello Lars. I am sorry, but your screenshots do not make sense... Both screenshots show the "XML Mapper" with its new face (VCL Styes) -- only the XML Mapper that we distribute through "GetIt" has the new face lift. One screenshot is for the "Schema view, the other for the "XML View (document)" We have not released any new version of "XML Mapper" for Delphi 12. What you get in Delphi 12 is the "stock good old XML Mapper". So all of this seems odd. If this is still an issue, can you please elaborate on the actual problem after considering my feedback in the previous paragraphs ? Thanks, Miguel. ( FYI, this is how the "stock XML Mapper" shipped with Delphi looks like: )
  3. Miguel Moreno

    Updated XMLMapper

    Hello Lars. Sorry for not replying on time... For some reason my email notifications coming from "Delphi-Praxis" started to go to my "junk" mailbox and I did not noticed until now. This has been fixed now. 😊 Regarding the error message that you are getting (see above): We have made big changes in the way that XML mapper handles errors. In the past, it would simply either ignore all errors -- no error message or feedback to the user -- or not handle them at all -- causing "blind" crashes with no clue or info about why it crashed. As part of the error handling overhauling, we have added several error handlers and we now try to give feedback to the user in all of them, so she/he knows what is going on. One of those errors has to do with a design flaw in the original XML mapper: XML Mapper was designed to handle "repeating XML elements" (i.e., "nested datasets") based on simple, non-complex elements ( Definition of XML complex elements ). Originally, XML Mapper "assumed" that the input XML always complied to the rule above, so it didn't even check or validated the XML data -- as a result, XML Mapper would simply hang up when the rule was not met. Once we detected this case, we added logic to validate the XML data, "catch" the error and inform the end user about the non-compliant issue. After we made these changes, we have now found several "modern day" XML files and schemas with "complex" XML elements defined as "repeating" ("nested dataset"). As part of our current development milestone -- correctly handle all valid modern day XML files -- we have focused on getting this issue fixed once and for all. We can only share for right now that the task has not been trivial -- it has required us to rewrite considerable parts of the original parsing and XML data structure logic to get it done right. This is currently the key milestone we must complete before releasing our next official XML Mapper version, so you will hear from us very soon when we feel that XML Mapper is now "good to go". In the mean time, I am sorry to inform you that there is nothing you can do about it -- XML Mapper will not be able to process your XML file, but at least you are now been "kindly informed" about it instead of just crashing 😁. Thanks, Miguel
  4. Miguel Moreno

    Delphi 10.4 missing XML Data Binding

    Just to clarify the issue experienced by Jim ( see text and image quoted above ) and to avoid further confusion: If the image posted by Jim faithfully represents the issue he is experiencing, then the problem is that there are some preliminary steps that need to be completed in order to have the "Create and Test Transformation" button enabled. The preliminary steps missing in his screenshot are as follows: Selection of the XML nodes in the left hand side panel to be mapped. Loading or creation of an XML data packet in the right hand side panel. Definition of mappings for each XML node on the left to each data packet field on the right. These would be shown in the middle panel. Once these steps are completed, the "Create and Test Transformation" button becomes "active" and you can now, as expected, create and test the XML mapping transformation. Thank you.
  5. Miguel Moreno

    Updated XMLMapper

    Lars: Hahahaha 😁 Glad to hear that "the crash [...] didn't happen" ... 👌🏼
  6. Miguel Moreno

    Updated XMLMapper

    Lars and Dick: I am please to inform you that Embarcadero has released the official "XML Mapper" for Delphi 11.3, internal version 28.0.47991.2819, via the GetIt package manager. We have made an extensive effort to make XML Mapper reliable and usable with any modern XSD and/or XML file. Please give it a try and let us know of any issue you may find through Embarcadero's Quality Central. Thanks.
  7. Miguel Moreno

    Updated XMLMapper

    Dick: The filters you expect to see are there ... Just switch to the "Schema View" tab on the left side panel 😊 Those filters apply only when you load an XML XSD schema ... When loading a raw XML file the filters do not apply, so that is the reason you do not see them when the "Document View" tab is selected. And do not feel bad ... We also feel that the source panel ( left side one ) of XML Mapper is a bit confusing ... We would like to overhaul the user interface to make it more intuitive, but for right now our main priority is to make XML Mapper fully usable, bug and crash free, and to support all modern XML documents and schemas. Please report any issue or bug that you find using the "Malawi Beta" XML Mapper ...
  8. Miguel Moreno

    Updated XMLMapper

    Hello Dick. For the new Delphi Alexandria 11.3, the included XML Mapper is still the old legacy version. To get the "XML Mapper Malawi Beta" version in the mean time, you have to launch the "GetIt Package Manager" from the tools menu ... Once you get the "GetIt" main dialog, type "xml mapper" in the search box ... The "XML Mapper Malawi Beta" will show up in the available packages list. Click on the "Install" button to install it in your Delphi environment ...
  9. Miguel Moreno

    Updated XMLMapper

    Lars and CDL: Yes, the final release of XML Mapper 11.3 is just around the corner and for right now it will still be distributed via GetIt. In the mean time, as suggested by Lars, you can get the 11.3 Beta XML Mapper to explore the new features. The companion document highlights the bugs fixed and the limitations of the beta. I will let you know once the final release is available for you to install. PS: Yes !! If you find something please report it via Quality Central !!
×