Hi,
I have an xml input like this, which has a keyValue, containing , and .
The multiple in caused logstash to have data type mismatch.
Is there a way in the xml filter to map as the field name and as the value or parse everything in xml filter to string? Thanks.
xml input:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
...
</soap:Header>
<soap:Body>
<ns2:GetFormsSetResponse xmlns:ns2="http://xmlns.bmogc.net/com/bmo/ebs/eforms/sdss/V2" xmlns:ns3="http://xmlns.bmogc.net/bmo/2002/header/" xmlns:ns4="http://xmlns.bmogc.net/hub/header/V1">
<header>
<correlationId>4faaa6a3-9fd6-4b81-bf69-633ea713c821</correlationId>
</header>
<packages>
<processControl>
<transitNumber>1039</transitNumber>
<sessionCustomer>
<customerID>685424209891550</customerID>
<name>
<firstName>GLSITABCD13</firstName>
<lastName>GLFABCD13</lastName>
</name>
</sessionCustomer>
<language>en-CA</language>
</processControl>
<package>
<packageObjectStore>CanadianPnC</packageObjectStore>
<packageType>CustomerPackage</packageType>
<packageIndex>1</packageIndex>
<deliveryDestinations>
<deliveryDestination>
<type>EFORM</type>
</deliveryDestination>
<deliveryDestination>
<type>FILENET</type>
</deliveryDestination>
<deliveryDestination>
<type>DTS</type>
<keyValues>
<keyValue>
<key>AutoClose</key>
<dataType>boolean</dataType>
<value>false</value>
</keyValue>
<keyValue>
<key>PendingReferenceExpiration</key>
<dataType>datetime</dataType>
<value>2018-11-20T14:15:41.973-05:00</value>
</keyValue>
<keyValue>
<key>CaptureMethod</key>
<dataType>string</dataType>
<value>BATCH SCANNED</value>
</keyValue>
</keyValues>
</deliveryDestination>
<deliveryDestination>
<type>PRINTER</type>
<keyValues>
<keyValue>
<key>location</key>
<dataType>string</dataType>
<value>\\D2971A04QD005.percomqa.adrootqa.bmogc.net\Printer4</value>
</keyValue>
</keyValues>
</deliveryDestination>
</deliveryDestinations>
Error:
[2018-11-20T21:26:02,278][WARN ][logstash.outputs.elasticsearch] eGroup>...</soap:Envelope>" /tmp/temp], :response=>{"index"=>{"_index"=>"dts-2018.11.20", "_type"=>"log", "_id"=>"AWczBANMTH81EwFHiK-Y", "status"=>400, "error"=>{"type"=>"illegal_argument_exception", "reason"=>"mapper [SOAP.Body.GetFormsSetResponse.packages.package.deliveryDestinations.deliveryDestination.keyValues.keyValue.value] of different type, current_type [date], merged_type [text]"}}}}
Regards,
Perry