I'm tryng optaplanner xml solution posting sample data to kie-server (ver. 7.11-FINAL) on wildfly11, via REST API (using SOAP-UI).
I deployed some sample project via kie-wb and I can successfully test sample xml with XPath reference to previous fact, so I can submit the XML data and get the best-solution calling the related endpoint.
But when I try to use id/reference for previous fact i get the com.thoughtworks.xstream.converters.ConversionException: Invalid reference error pointing to the xml line where I change XPath reference with id/reference. I found that XStream has a setting to process the incoming xml in the right way (XStream.ID_REFERENCES), but I canno't found in the kie-wb/kie-server how to set this mode.
Any help is very appreciated, thanks
Giovanni
--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/8029ccde-594a-4e8e-9061-627022f47c58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/b8ca298e-d3e9-4043-a608-1465c8a9e585%40googlegroups.com.
<TeamRoster>
<employeeList>
<Employee>
<name>Luigi</name>
</Employee>
<Employee>
<name>Mauro</name>
</Employee>
<Employee>
<name>Pietro</name>
</Employee>
<Employee>
<name>Gino</name>
</Employee>
</employeeList>
<teamList>
<Team>
<name>Squadra 1</name>
<employeeList>
<Employee reference="../../../../employeeList/Employee"/>
<Employee reference="../../../../employeeList/Employee[2]"/>
</employeeList>
......... <TeamRoster id="1">
<employeeList id="2">
<Employee id="3">
<id>0</id>
<name>Luigi</name>
</Employee>
<Employee id="4">
<id>1</id>
<name>Mauro</name>
</Employee>
<Employee id="5">
<id>2</id>
<name>Pietro</name>
</Employee>
<Employee id="6">
<id>3</id>
<name>Gino</name>
</Employee>
</employeeList>
<teamList id="7">
<Team id="8">
<id>0</id>
<name>Squadra 1</name>
<employeeList id="9">
<Employee reference="3"/>
<Employee reference="4"/>
</employeeList>xStream = new XStream();
xStream.setMode(XStream.ID_REFERENCES);To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/7e87284e-9bee-491e-8495-af1d1ddd9aec%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/6a9b4c39-89f3-47cc-8cdd-fe77046eba83%40googlegroups.com.
On 4 Oct 2018, at 11:36, Giovanni Martano <giovanni...@gmail.com> wrote:Thanks for details Maciej, but I'm not using any kie client, I'm using a generic rest client (SOAP-UI) because I only need to access via different client (python, android, php) to kie-server rest endpoints.It will work anyway? The jar package I intend.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/ba3994ec-4b73-4b51-beb8-7828c09ef48d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/ae384da2-4916-4055-9d1e-1f66d9481b2f%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/79a2bafb-26ea-4f9f-8948-88f37e9d4cbe%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/8a2ff4b6-701e-4ffa-89fa-12af982561a6%40googlegroups.com.
Maciej
Maciej
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/ae384da2-4916-4055-9d1e-1f66d9481b2f%40googlegroups.com<span style="font-family:Helvetica;font-size:1
Thanks for forwarding, Michael.
This kie-server feature isn't optaplanner specific though,
although optaplanner use cases might run into it more easily.
In any case, currently kie-server only supports XPath references
in XStream as there no way to make kie-server's marshaller call:
xStream.setMode(XStream.ID_REFERENCES);
through a HTTP parameter.
FWIW, Looks like a duplicate of this optaplanner question:
https://stackoverflow.com/questions/52623500/optaplanner-7-11-id-reference-error-posting-xml-for-solution-to-kie-server
And specifically this RFE jira:
https://issues.jboss.org/browse/DROOLS-3075
With kind regards,
Geoffrey De Smet