XML to Domain mapping is not mapping my XML to Domain elements

1
My webservice responds with valid XML my XML-to-Domain mapping doesn't respond with errors I just get zero results (tested on MX5.8.1 and 5.9.1) Simplified XML: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetResultResponse xmlns="http://www.relatics.com/"> <GetResultResult> <Data> <Workpackage Name=" UO Grond Binnendijks Dijkvak I (Nieuw-Lekkerland)" ID="6413bb91-3b66-e311-a60c-0026b985175c" Description="" Goal="" IsWorkpackage="False" NodeNumberLabel="DWP-1.5.1.1.1" NodeNumber="DWP-1.5.1.1.1" NodeName="" Status="Leeg" StatusID="d04a4eec-e72c-e311-a60c-0026b985175c" StartDate="2014-03-12" EndDate="2014-10-13" InExecution="Nee" /> </Data> </GetResultResult> </GetResultResponse> </soap:Body> </soap:Envelope> WSDL: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.relatics.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.relatics.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <wsdl:types> <s:schema elementFormDefault="qualified" targetNamespace="http://www.relatics.com/"> <s:element name="GetResult"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Operation" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Identification"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Identification"> <s:complexType> <s:sequence> <s:element name="Workpackage" type="s:string" maxOccurs="1" /> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> <s:element minOccurs="0" maxOccurs="1" name="Parameters"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Authentication"> <s:complexType> <s:sequence> <s:element name="ModifiedDateTime" type="s:date" maxOccurs="1" /> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> <s:element minOccurs="0" maxOccurs="1" name="Authentication"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Authentication"> <s:complexType> <s:sequence> <s:element name="Entrycode" type="s:string" maxOccurs="1" /> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> <s:element name="GetResultResponse" xmlns="http://www.relatics.com/"> <s:complexType> <s:sequence> <s:element name="GetResultResult"> <s:complexType> <s:sequence> <s:element name="Data"> <s:complexType> <s:sequence> <s:element name="Workpackage" maxOccurs="unbounded"> <s:complexType> <s:attribute name="Name" type="s:string"></s:attribute> <s:attribute name="ID" type="s:string"></s:attribute> <s:attribute name="Description" type="s:string"></s:attribute> <s:attribute name="Goal" type="s:string"></s:attribute> <s:attribute name="IsWorkpackage" type="s:string"></s:attribute> <s:attribute name="NodeNumberLabel" type="s:string"></s:attribute> <s:attribute name="NodeNumber" type="s:string"></s:attribute> <s:attribute name="NodeName" type="s:string"></s:attribute> <s:attribute name="Status" type="s:string"></s:attribute> <s:attribute name="StatusID" type="s:string"></s:attribute> <s:attribute name="StartDate" type="s:string"></s:attribute> <s:attribute name="EndDate" type="s:string"></s:attribute> <s:attribute name="InExecution" type="s:string"></s:attribute> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> <s:element name="Import"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Operation" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Identification"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Identification"> <s:complexType> <s:sequence> <s:element name="Workpackage" type="s:string" maxOccurs="1" /> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> <s:element minOccurs="0" maxOccurs="1" name="Parameters"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Authentication"> <s:complexType> <s:sequence> <s:element name="ModifiedDateTime" type="s:date" maxOccurs="1" /> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> <s:element minOccurs="0" maxOccurs="1" name="Filename" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="Data" type="s:string" /> </s:sequence> </s:complexType> </s:element> <s:element name="ImportResponse"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="ImportResult"> <s:complexType> <s:sequence> <s:element name="Import"> <s:complexType> <s:sequence> <s:element name="Message" maxOccurs="unbounded" minOccurs="0"> <s:complexType> <s:attribute name="Time" type="s:time"></s:attribute> <s:attribute name="Result" type="s:string"></s:attribute> </s:complexType> </s:element> <s:element name="Elements"> <s:complexType> <s:sequence> <s:element name="Element"> <s:complexType> <s:attribute name="Action" type="s:string"></s:attribute> <s:attribute name="ID" type="s:string"></s:attribute> <s:attribute name="ForeignKey" type="s:string"></s:attribute> <s:attribute name="ActivityID" type="s:integer"></s:attribute> <s:attribute name="ActivityName" type="s:string"></s:attribute> <s:attribute name="LocationDetails" type="s:string"></s:attribute> <s:attribute name="ObjectDetails" type="s:string"></s:attribute> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:schema> </wsdl:types> <wsdl:message name="GetResultSoapIn"> <wsdl:part name="parameters" element="tns:GetResult" /> </wsdl:message> <wsdl:message name="GetResultSoapOut"> <wsdl:part name="parameters" element="tns:GetResultResponse" /> </wsdl:message> <wsdl:message name="ImportSoapIn"> <wsdl:part name="parameters" element="tns:Import" /> </wsdl:message> <wsdl:message name="ImportSoapOut"> <wsdl:part name="parameters" element="tns:ImportResponse" /> </wsdl:message> <wsdl:portType name="DataExchangeSoap"> <wsdl:operation name="GetResult"> <wsdl:input message="tns:GetResultSoapIn" /> <wsdl:output message="tns:GetResultSoapOut" /> </wsdl:operation> <wsdl:operation name="Import"> <wsdl:input message="tns:ImportSoapIn" /> <wsdl:output message="tns:ImportSoapOut" /> </wsdl:operation> </wsdl:portType> <wsdl:portType name="DataExchangeHttpGet" /> <wsdl:portType name="DataExchangeHttpPost" /> <wsdl:binding name="DataExchangeSoap" type="tns:DataExchangeSoap"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="GetResult"> <soap:operation soapAction="http://www.relatics.com/GetResult" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="Import"> <soap:operation soapAction="http://www.relatics.com/Import" style="document" /> <wsdl:input> <soap:body use="literal" /> </wsdl:input> <wsdl:output> <soap:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="DataExchangeSoap12" type="tns:DataExchangeSoap"> <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> <wsdl:operation name="GetResult"> <soap12:operation soapAction="http://www.relatics.com/GetResult" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> <wsdl:operation name="Import"> <soap12:operation soapAction="http://www.relatics.com/Import" style="document" /> <wsdl:input> <soap12:body use="literal" /> </wsdl:input> <wsdl:output> <soap12:body use="literal" /> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:binding name="DataExchangeHttpGet" type="tns:DataExchangeHttpGet"> <http:binding verb="GET" /> </wsdl:binding> <wsdl:binding name="DataExchangeHttpPost" type="tns:DataExchangeHttpPost"> <http:binding verb="POST" /> </wsdl:binding> <wsdl:service name="DataExchange"> <wsdl:port name="DataExchangeSoap" binding="tns:DataExchangeSoap"> <soap:address location="https://mourik.relaticsonline.com/dataExchange.asmx" /> </wsdl:port> <wsdl:port name="DataExchangeSoap12" binding="tns:DataExchangeSoap12"> <soap12:address location="https://mourik.relaticsonline.com/dataExchange.asmx" /> </wsdl:port> <wsdl:port name="DataExchangeHttpGet" binding="tns:DataExchangeHttpGet"> <http:address location="https://mourik.relaticsonline.com/dataExchange.asmx" /> </wsdl:port> <wsdl:port name="DataExchangeHttpPost" binding="tns:DataExchangeHttpPost"> <http:address location="https://mourik.relaticsonline.com/dataExchange.asmx" /> </wsdl:port> </wsdl:service> </wsdl:definitions> The GetResultResponse is used for mapping the XML to Domain objects XML Importer output: 2014-10-29 10:51:01.164 XmlImporter Initializing xml importer for mapping 'Relatics.RelaticsMourikXML_to_WBS' 2014-10-29 10:51:01.165 XmlImporter Available mapping elements: (...) 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: 'http://schemas.xmlsoap.org/soap/envelope/' 'soap:Envelope' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: '' 'xmlns:soap' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: '' 'xmlns:xsi' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: '' 'xmlns:xsd' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: 'http://schemas.xmlsoap.org/soap/envelope/' 'soap:Body' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: 'http://www.relatics.com/' 'GetResultResponse' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: '' 'xmlns' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: 'http://www.relatics.com/' 'GetResultResult' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: '' 'xmlns' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: 'http://www.relatics.com/' 'Data' 2014-10-29 10:51:01.166 XmlImporter Added to xmlpath: '' 'xmlns' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: 'http://www.relatics.com/' 'Workpackage' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'Name' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'ID' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'Description' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'Goal' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'IsWorkpackage' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'NodeNumberLabel' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'NodeNumber' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'NodeName' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'Status' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'StatusID' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'StartDate' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'EndDate' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'InExecution' 2014-10-29 10:51:01.167 XmlImporter Added to xmlpath: '' 'xmlns' 2014-10-29 10:51:01.167 XmlImporter Endelement encountered for http://schemas.xmlsoap.org/soap/envelope/:envelope|http://schemas.xmlsoap.org/soap/envelope/:body|http://www.relatics.com/:getresultresponse|http://www.relatics.com/:getresultresult|http://www.relatics.com/:data|http://www.relatics.com/:workpackage with content (localName: Workpackage) 2014-10-29 10:51:01.167 XmlImporter Endelement encountered for http://schemas.xmlsoap.org/soap/envelope/:envelope|http://schemas.xmlsoap.org/soap/envelope/:body|http://www.relatics.com/:getresultresponse|http://www.relatics.com/:getresultresult|http://www.relatics.com/:data with content (localName: Data) 2014-10-29 10:51:01.167 XmlImporter Endelement encountered for http://schemas.xmlsoap.org/soap/envelope/:envelope|http://schemas.xmlsoap.org/soap/envelope/:body|http://www.relatics.com/:getresultresponse|http://www.relatics.com/:getresultresult with content (localName: GetResultResult) 2014-10-29 10:51:01.167 XmlImporter Endelement encountered for http://schemas.xmlsoap.org/soap/envelope/:envelope|http://schemas.xmlsoap.org/soap/envelope/:body|http://www.relatics.com/:getresultresponse with content (localName: GetResultResponse) 2014-10-29 10:51:01.167 XmlImporter Endelement encountered for http://schemas.xmlsoap.org/soap/envelope/:envelope|http://schemas.xmlsoap.org/soap/envelope/:body with content (localName: Body) 2014-10-29 10:51:01.167 XmlImporter Endelement encountered for http://schemas.xmlsoap.org/soap/envelope/:envelope with content (localName: Envelope) 2014-10-29 10:51:01.168 XmlImporter Finished importing xml for mapping 'Relatics.RelaticsMourikXML_to_WBS' The end result is 0 Workpackages outputted, I've validated the XML in SOAP which returns an OK status. What am I missing?
asked
1 answers
1

@Everyone, Mendix has confirmed that my problems is caused by the changes in MX5.8 and that they will try and implement a fix in the upcoming 2 months.

For now the workaround is to filter the following tags:

<soap:Envelope>
<soap:Body>
  • of course there end tags out of the result output before parsing it in a XML to Domain mapping.

This is of course only the case where you parse a XML document and not when parsing a web-service response directly. My case requires this work around due to a bug in the output that I was already filtering pre-parsing stage.

answered