XML Error Importing Failing (latestHttpResponse)

0
Good day,  I’m attempting to import the ErrorReponse via XML from the latestHttpResponse object. The content of the latestHttpResponse is: <ErrorResponse xmlns="http://webservices.amazon.com/AWSFault/2005-15-09"> <Error> <Type>Sender</Type> <Code>InvalidAction</Code> <Message>Could not find operation SendMail for version 2010-12-01</Message> </Error> <RequestId>bb6227e0-5941-4c5f-86af-8eb5e9a878f0</RequestId> </ErrorResponse> To this I apply an import mapping using the following XML Schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <!-- XML Schema Generated from XML Document on Tue Nov 16 2021 19:54:33 GMT+0200 (South Africa Standard Time) --> <!-- with XmlGrid.net Free Online Service http://xmlgrid.net --> <xs:element name="ErrorResponse"> <xs:complexType> <xs:sequence> <xs:element name="Error"> <xs:complexType> <xs:sequence> <xs:element name="Type" type="xs:string"></xs:element> <xs:element name="Code" type="xs:string"></xs:element> <xs:element name="Message" type="xs:string"></xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="RequestId" type="xs:string"></xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> On the import I get the following error message: Error Type: com.mendix.integration.importer.xml.XmlImporter$XmlValidationException Error Message: cvc-elt.1.a: Cannot find the declaration of element 'ErrorResponse'.   I’ve tried attempted to: - pass the xml directly into the import mapping via a string - pass the latestHttpResponse as a parameter   None of these have worked.
asked
1 answers
0

I had the same problem. I solved it by using the JSON in $latestHttpResponse/Content as a JSONstructure and creating an ImportMapping from it. Then use Import with Mapping with input latestHttpResponse and use the output to show in a message. 

answered