[
https://issues.jboss.org/browse/DROOLS-1509?page=com.atlassian.jira.plugi...
]
Matteo Mortari edited comment on DROOLS-1509 at 4/4/17 4:57 AM:
----------------------------------------------------------------
Examples XStream with the proposed PR with the correction, at commit b9189bd :
{code:xml}
10:34:25.973 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to send GET
request to 'http://localhost:43147/kie-server-services/services/rest/server'
10:34:26.001 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="Kie Server info">
<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:33:50.419 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:33:50 CEST 2017</string>
</messages>
</kie-message>
</messages>
</result>
</response>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:34:26.052 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="OK from container
'two-dmn-models'">
<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>
</response>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:34:26.057 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to send GET
request to 'http://localhost:43147/kie-server-services/services/rest/server'
10:34:26.063 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="Kie Server info">
<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:33:50.419 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:33:50 CEST 2017</string>
</messages>
</kie-message>
</messages>
</result>
</response>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:34:26.080 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="OK from container
'two-dmn-models'">
<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>
</response>'
into type: 'class org.kie.server.api.model.ServiceResponse'
{code}
was (Author: tari_manga):
Example XStream with the proposed PR with the correction, at commit b9189bd :
{code:xml}
10:34:25.973 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to send GET
request to 'http://localhost:43147/kie-server-services/services/rest/server'
10:34:26.001 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="Kie Server info">
<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:33:50.419 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:33:50 CEST 2017</string>
</messages>
</kie-message>
</messages>
</result>
</response>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:34:26.052 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="OK from container
'two-dmn-models'">
<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>
</response>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:34:26.057 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to send GET
request to 'http://localhost:43147/kie-server-services/services/rest/server'
10:34:26.063 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="Kie Server info">
<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:33:50.419 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:33:50 CEST 2017</string>
</messages>
</kie-message>
</messages>
</result>
</response>'
into type: 'class org.kie.server.api.model.ServiceResponse'
10:34:26.080 [main] DEBUG o.k.s.c.i.AbstractKieServicesClientImpl - About to deserialize
content:
'<response type="SUCCESS" msg="OK from container
'two-dmn-models'">
<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>
</response>'
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)