XML (local file) to Domain mapping

0
I am using a webservice to retrieve XML and have an existing XML-To-Domain mapping to map the XML coming from the webservice to a domain entity. I have retrieved a number of XML files from the same webservice (using SoapUI) and stored those XML files on my local disk. How can I use to existing XML-To-Domain mapping to get upload the locally stored XML files into Mendix ?
asked
3 answers
3

You can't. The soap calls have a soap:envelope tag around them, which makes them useless as xml documents because there isn't any XSD to which they conform (unless you hack your way around the existing XSD and WSDL to make this work, which is kinda ugly)

answered
0

Upload the files using the file manager, so you have them available as a FileDocument. Then make a microflow and use the 'Import XML Document' activity, select the FileDocument containing the XML and select which XML-to-Domain mapping you want to use.

answered
0

Hi Bas, Thanks for your response. I tried what you indicated on the following way:

  • Added an entity (ProductEUBDP_XML) which is derived from System.FileDocument
  • Added an Overview and New-Edit form for the newly created entity
  • Using the New/Edit form I can upload the XML file from my local disk into mendix
  • The Overview Form shows the name of the just uploaded XML file
  • When this line is selected an the microflow button the following simple microflow executes using the same XMLToDomainMapping as when the XML was retrieved via the webservice: alt text

However, nothing is imported. Any idea what I am doing wrong here ?

answered