[
https://issues.jboss.org/browse/DROOLS-1509?page=com.atlassian.jira.plugi...
]
Matteo Mortari commented on DROOLS-1509:
----------------------------------------
Examples XStream before, showing the inconsistencies:
{code:xml}
10:48:46.045 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to send GET
request to 'http://localhost:34455/kie-server-services/services/rest/server'
10:48:46.074 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<org.kie.server.api.model.ServiceResponse>
<type>SUCCESS</type>
<msg>Kie Server info</msg>
<result class="kie-server-info">
<serverId>a0e625bf-251d-3c1f-ad11-0a17f1c14e21</serverId>
<version>7.0.0-SNAPSHOT</version>
<name>KieServer@/kie-server-services</name>
<location>http://localhost:8230/kie-server/services/rest/server</location>
<capabilities>
<string>KieServer</string>
<string>BRM</string>
<string>DMN</string>
</capabilities>
<messages>
<kie-message>
<severity>INFO</severity>
<timestamp>2017-04-04 08:48:07.717 UTC</timestamp>
<messages>
<string>Server
KieServerInfo{serverId='a0e625bf-251d-3c1f-ad11-0a17f1c14e21',
version='7.0.0-SNAPSHOT',
location='http://localhost:8230/kie-server/services/rest/server'}started
successfully at Tue Apr 04 10:48:07 CEST 2017</string>
</messages>
</kie-message>
</messages>
</result>
</org.kie.server.api.model.ServiceResponse>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:48:46.122 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<org.kie.server.api.model.ServiceResponse>
<type>SUCCESS</type>
<msg>OK from container 'two-dmn-models'</msg>
<result class="dmn-evaluation-result">
<
model-namespace>https://www.drools.org/kie-dmn/function-definition<...
<model-name>function-definition</model-name>
<dmn-context class="linked-hash-map">
<entry>
<string>a</string>
<int>10</int>
</entry>
<entry>
<string>b</string>
<int>5</int>
</entry>
<entry>
<string>Math</string>
<map>
<entry>
<string>SumFunction</string>
<dmn-node-stub>function Math( v1, v2 )</dmn-node-stub>
</entry>
<entry>
<string>Sum</string>
<big-decimal>15</big-decimal>
</entry>
</map>
</entry>
</dmn-context>
<messages/>
<decision-results>
<entry>
<string>_b459d12a-f00f-4846-a12e-2883455f7d7b</string>
<dmn-decision-result>
<decision-id>_b459d12a-f00f-4846-a12e-2883455f7d7b</decision-id>
<decision-name>Math</decision-name>
<result class="map"
reference="../../../../dmn-context/entry[3]/map"/>
<status>SUCCEEDED</status>
</dmn-decision-result>
</entry>
</decision-results>
</result>
</org.kie.server.api.model.ServiceResponse>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:48:46.127 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to send GET
request to 'http://localhost:34455/kie-server-services/services/rest/server'
10:48:46.133 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<org.kie.server.api.model.ServiceResponse>
<type>SUCCESS</type>
<msg>Kie Server info</msg>
<result class="kie-server-info">
<serverId>a0e625bf-251d-3c1f-ad11-0a17f1c14e21</serverId>
<version>7.0.0-SNAPSHOT</version>
<name>KieServer@/kie-server-services</name>
<location>http://localhost:8230/kie-server/services/rest/server</location>
<capabilities>
<string>KieServer</string>
<string>BRM</string>
<string>DMN</string>
</capabilities>
<messages>
<kie-message>
<severity>INFO</severity>
<timestamp>2017-04-04 08:48:07.717 UTC</timestamp>
<messages>
<string>Server
KieServerInfo{serverId='a0e625bf-251d-3c1f-ad11-0a17f1c14e21',
version='7.0.0-SNAPSHOT',
location='http://localhost:8230/kie-server/services/rest/server'}started
successfully at Tue Apr 04 10:48:07 CEST 2017</string>
</messages>
</kie-message>
</messages>
</result>
</org.kie.server.api.model.ServiceResponse>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:48:46.151 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<org.kie.server.api.model.ServiceResponse>
<type>SUCCESS</type>
<msg>OK from container 'two-dmn-models'</msg>
<result class="dmn-evaluation-result">
<
model-namespace>https://github.com/kiegroup/kie-dmn/input-data-string&...
<model-name>input-data-string</model-name>
<dmn-context class="linked-hash-map">
<entry>
<string>Full Name</string>
<string>John Doe</string>
</entry>
<entry>
<string>Greeting Message</string>
<string>Hello John Doe</string>
</entry>
</dmn-context>
<messages/>
<decision-results>
<entry>
<string>d_GreetingMessage</string>
<dmn-decision-result>
<decision-id>d_GreetingMessage</decision-id>
<decision-name>Greeting Message</decision-name>
<result class="string">Hello John Doe</result>
<status>SUCCEEDED</status>
</dmn-decision-result>
</entry>
</decision-results>
</result>
</org.kie.server.api.model.ServiceResponse>'
into type: 'class org.kie.server.api.model.ServiceResponse'
{code}
ServiceResponse XStream marshalling inconsistencies with JAXB
-------------------------------------------------------------
Key: DROOLS-1509
URL:
https://issues.jboss.org/browse/DROOLS-1509
Project: Drools
Issue Type: Bug
Components: kie server
Reporter: Matteo Mortari
Assignee: Matteo Mortari
XML Element in XStream is rendered with canonical name instead of being consistent with
JAXB, for "response".
Additionally in JAXB marshalling the {{type}} and {{msg}} are attributes, while in
XStream are child elements.
Please notice String special character escape is handled differently JAXB Vs XStream and
this is NOT subject of this bug.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)