Bug 1315636 - Type information is lost when using JSON Marshaller for sending GetObject command to KieServer
Summary: Type information is lost when using JSON Marshaller for sending GetObject com...
Keywords:
Status: CLOSED DUPLICATE of bug 1283208
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Kie-Server
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: ---
Assignee: Maciej Swiderski
QA Contact: Karel Suta
URL:
Whiteboard:
Depends On: 1283208
Blocks: 1315767
TreeView+ depends on / blocked
 
Reported: 2016-03-08 09:50 UTC by Anton Giertli
Modified: 2016-04-07 02:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1315767 (view as bug list)
Environment:
Last Closed: 2016-04-07 02:07:48 UTC
Type: Bug


Attachments (Terms of Use)

Description Anton Giertli 2016-03-08 09:50:43 UTC
Description of problem:
If you send GetObject command using JSON to the KieServer, the type information is lost.

The type information is present when using XStream for example, 

Version-Release number of selected component (if applicable):

BRMS 6.2.1

How reproducible:

always
Steps to Reproduce:
1. Deploy some KJAR onto the KieServer
2. Insert some custom object into the KieSesession and call GetObject command to retrieve it
3. If you use JSON marshaller, the type information for this Custom Object is lost


Sample client code for interacting with the KieServer
https://gist.github.com/agiertli/d8ee2ab934cf1987097b

The server response of the above call is this:

{
  "results" : [ {
    "key" : "insert-identifier",
    "value" : {"org.Person":{
  "name" : "anton"
}}
  }, {
    "key" : "get-obj-response",
    "value" : [ {
  "name" : "anton"
} ]
  }, {
    "key" : "fire-identifier",
    "value" : 0
  } ],
  "facts" : [ {
    "key" : "insert-identifier",
    "value" : {"org.drools.core.common.DefaultFactHandle":{
  "external-form" : "0:1:823286421:823286421:1:DEFAULT:NON_TRAIT:org.Person"
}}
  } ]
}

The object inserted is of type org.Person - as you can see, under "get-obj-response" this type is simply not listed.

The response could look like this:

"results" : [ {
    "key" : "responseObjects",
    "value" : [
{"org.Person":{
  "name" : "anton",...
}},
...

Actual results:
 Type information about the custom object is lost, when sending GetObject command to KieServer using JSON

Expected results:

 Type information about the custom object is lost, when sending GetObject command to KieServer using JSON
Additional info:

Comment 4 Karel Suta 2016-03-14 12:45:10 UTC
This issue was already fixed for 6.3.0 by https://github.com/droolsjbpm/droolsjbpm-integration/pull/253.

Comment 5 Edson Tirelli 2016-04-07 02:07:48 UTC

*** This bug has been marked as a duplicate of bug 1283208 ***


Note You need to log in before you can comment on or make changes to this bug.