Open TomasTokaMrazek opened 5 years ago
Ok so after few hours I finally found, what's wrong.
DSS does not have sqlType XML, so it returns xml as escaped string. Log mediator for some reason doesn't reflect, that it's escaped and shows full XML. Proper log of body should look like this:
<falcon xmlns="cz.styrax.sodexo.middleware.Falcon">
<result><response result="INPUT"><mw caller="FALCON" caller_id="161850" entity="BANKOVNI UCET" operation="ID" partner="SPO" partner_id="146758"/></response></result>
</falcon>
The solution is to first use property mediator and store it as type OM, then use this as source in enrich mediator.
Still tho, both log and enrich mediator with given xpath //el1:falcon/el1:result
should select <result>
node instead of it's contents.
Description:
I have particular DSS:
When I call this service from ESB, I correctly get response. Full envelope log (formatted):
I'm trying to enrich element to body, but I have trouble with xpath error, where elements are not found. So I tried several xpath options in Log Mediator.
and here's the log result (formatted):
To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:d8aec2de-b1d9-457b-a7f3-638086a1791d, Direction: request, 1 = , 2 = <response result="INPUT"><mw caller="FALCON" caller_id="161850" entity="BANKOVNI UCET" operation="ID" partner="SPO" partner_id="146758"/></response>, 3 = , 4 = , 5 = <response result="INPUT"><mw caller="FALCON" caller_id="161850" entity="BANKOVNI UCET" operation="ID" partner="SPO" partner_id="146758"/></response>, 6 = , Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><falcon xmlns="cz.styrax.sodexo.middleware.Falcon"><result><response result="INPUT"><mw caller="FALCON" caller_id="161850" entity="BANKOVNI UCET" operation="ID" partner="SPO" partner_id="146758"/></response></result></falcon></soapenv:Body></soapenv:Envelope>
1 – correctly fails due to missing el1 namespace prefix in
<result>
2 – selects<response>
node instead of<result>
node 3 – finds nothing instead of<response>
node 4 – correctly fails due to missing el1 namespace prefix everywhere 5 – same as 2, should select<result>
node instead of<response>
6 – correctly fails due to missing el1 namespace prefix in<falcon>
Strangely enough, right after log mediator I have enrich mediator.
Log mediator right after enrich mediator correctlly shows body with element.
To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:d8aec2de-b1d9-457b-a7f3-638086a1791d, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><result xmlns="cz.styrax.sodexo.middleware.Falcon"><response result="INPUT"><mw caller="FALCON" caller_id="161850" entity="BANKOVNI UCET" operation="ID" partner="SPO" partner_id="146758"/></response></result></soapenv:Body></soapenv:Envelope>
But no matter what I put in enrich xpath, I'm unable to select
<response>
node, that's why I tried every possible outcome in previous log in a first place.Either I'm missing something, or there is something wrong with xpath and namespaces.
Affected Product Version:
EI: 6.4.0 OS: Win 10 64bit DB: PostgreSQL 11.2