You need xml that validates to an XSD. Load up the XSD in mendix (modeler). Then upload the xml to the runtime as a FileDocument. Use an "Import XML" microflow activity to read the filedocument containing the xml file into the Mendix database.
Thanks Achiel for your quick response.
I do have a XSD and mapping defined. The problem originally was that the XML serialize in C# doesn't handle Lists. So for now, I seperated the child Lists as it uses an Interface, which is non serializable.
My question is this though: On my microflow, I have an XML document defined, which contains the mapping to the XML-to-Domain on the few fields. All good. Now from the C# point of view, I have to populate this variable on the microflow, which is now an XML Document.
How I return the xml string to a mendix xml document? Or do I read it in as a string containing the xml, and then import that? But I can't as the string can't convert to an xml document.
Example from c#: //this is the published web service in mendix: Test.testWSDLWS newApp = new QUIRCWcf.Test.testWSDLWS();
//xml serialize the object to be returned to mendix //so I sit with an xml string - want to convert this so mendix can read //it String tempXML3 = ToXMLOBJ(test);
//now populate the parameter - which is called xmlDocument on the //microflow for this web service as parameter newApp.XMLDocument = tempXML3;
Sorry for the repeated question, very new to this. Appreciate your help.
To ask this better,
From a Java point of view, it is good, because we have the mendix java API. From C#, what will need to pass in from the code to have an microflow XML parameter populated, not being imported, but xml string rather being inserted into the mendix flow.
Hope this makes sense
Thanks to all
Why do you not write custom java code to change the string to xml? We had the same problem once that a webservice produced a very lousy xml. So we retrieved it as string handed it over to the custom java action and gave a good xml file back to Mendix.