Item to string in java

Wednesday, 13 December 2017 · 2 messages · last reply 14 Dec 2017
TD
Tushar Deshmukh13 Dec 2017 13:15 #
Namaste, Sorry it might be documented but I m unable to find it. Please please point in correct direction. How can we convert item from restxq to string in java.
My restxq is as below
import tallyfunction:"tdd.Tfunctions"
%rest:post("{$data}")
Function  checkInJava($data as item())
{
tallyfunction:checktosave()
};
My java class package tdd public class Tfunctions{
public String checktosave(Item xml)
{
return xml.toString();
}
}
I m getting 64bit string Not original string sent by clients. Thanks in advance. Mangal bhavna sahit, Tushar
CG
Christian Grün14 Dec 2017 01:16 #
Namaste Tushar,
Quoted text · Tushar Deshmukh · 7 lines
> My restxq is as below > import tallyfunction:"tdd.Tfunctions" > %rest:post("{$data}") > Function checkInJava($data as item()) > { > tallyfunction:checktosave() > };
We are ready to help, but please help us first. Your code snippet bears resemblance to RESTXQ, but definitely not enough to call it like that.
Quoted text · Tushar Deshmukh · 5 lines
> My java class > > package tdd > public class Tfunctions{ > ...
Same here. Please try harder. धन्यवाद. Bis bald, Christian

⚡Generated with XQuery