[JBoss JIRA] (ISPN-7991) Improve Compatibility between Rest and HotRod for text content
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7991?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-7991:
------------------------------------
Description: When dealing with text based content, writing via Hot Rod and reading via Rest works fine out of the box, but not the other way around: it requires deploying a modified StringMarshaller in the server (was: Writing via Hot Rod and reading via Rest works fine, but not the other way around)
> Improve Compatibility between Rest and HotRod for text content
> --------------------------------------------------------------
>
> Key: ISPN-7991
> URL: https://issues.jboss.org/browse/ISPN-7991
> Project: Infinispan
> Issue Type: Enhancement
> Components: Server
> Affects Versions: 8.2.7.Final, 9.1.0.Beta1, 9.0.3.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
>
> When dealing with text based content, writing via Hot Rod and reading via Rest works fine out of the box, but not the other way around: it requires deploying a modified StringMarshaller in the server
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 6 months
[JBoss JIRA] (ISPN-7991) Compatibility between Rest and HotRod not working on both ways
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-7991?page=com.atlassian.jira.plugin.... ]
Martin Gencur edited comment on ISPN-7991 at 7/10/17 4:14 AM:
--------------------------------------------------------------
Option 1 is what I had in mind. I've tried it and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to StringMarshaller (https://github.com/infinispan/infinispan/blob/master/commons/src/main/jav...):
{code}
public StringMarshaller() {
this.charset = Charset.forName("UTF-8");
}
{code}
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via REST:
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
was (Author: mgencur):
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller:
{code}
public StringMarshaller() {
this.charset = Charset.forName("UTF-8");
}
{code}
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
> Compatibility between Rest and HotRod not working on both ways
> --------------------------------------------------------------
>
> Key: ISPN-7991
> URL: https://issues.jboss.org/browse/ISPN-7991
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.2.7.Final, 9.1.0.Beta1, 9.0.3.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
>
> Writing via Hot Rod and reading via Rest works fine, but not the other way around
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 6 months
[JBoss JIRA] (ISPN-7991) Compatibility between Rest and HotRod not working on both ways
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-7991?page=com.atlassian.jira.plugin.... ]
Martin Gencur edited comment on ISPN-7991 at 7/10/17 4:10 AM:
--------------------------------------------------------------
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller:
{code}
public StringMarshaller() {
this.charset = Charset.forName("UTF-8");
}
{code}
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
was (Author: mgencur):
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
> Compatibility between Rest and HotRod not working on both ways
> --------------------------------------------------------------
>
> Key: ISPN-7991
> URL: https://issues.jboss.org/browse/ISPN-7991
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.2.7.Final, 9.1.0.Beta1, 9.0.3.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
>
> Writing via Hot Rod and reading via Rest works fine, but not the other way around
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 6 months
[JBoss JIRA] (ISPN-7991) Compatibility between Rest and HotRod not working on both ways
by Martin Gencur (JIRA)
[ https://issues.jboss.org/browse/ISPN-7991?page=com.atlassian.jira.plugin.... ]
Martin Gencur commented on ISPN-7991:
-------------------------------------
I've tried option 1) and it worked for me.
Steps to reproduce my behavior:
1) add no-arg constructor to org.infinispan.commons.marshall.StringMarshaller
2) deploy the compiled marshaller to the server and register it via
{code}
<compatibility enabled="true" marshaller="org.infinispan.commons.marshall.StringMarshaller"/>
{code}
3) register the marshaller in HotRod client:
{code}
builder.marshaller(org.infinispan.commons.marshall.StringMarshaller.class)
{code}
4) put the data via
{code}
curl -v -u test:test -X POST -H 'Content-type: application/xml' -d @file.xml http://localhost:8080/rest/compat/1
{code}
5) read the data a via HotRod:
{code}
cache.get("1")
{code}
I really get what I stored there, i.e. the XML.
> Compatibility between Rest and HotRod not working on both ways
> --------------------------------------------------------------
>
> Key: ISPN-7991
> URL: https://issues.jboss.org/browse/ISPN-7991
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.2.7.Final, 9.1.0.Beta1, 9.0.3.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
>
> Writing via Hot Rod and reading via Rest works fine, but not the other way around
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 6 months