The problem that I'm facing is that from a certain amount of characters,
the server is stalled, I don't get a response, and it says like "Waiting
for localhost ...". This happens as soon as the string count is higher than
15200 characters.
So to make sure the problem isn't with anything else I just made a test web
service that gets a JAXB class as xml and it just puts it in a new object
and sends it back to the client. Everythings goings as expected, but as
soon as the is above 15200 characters, I'm not getting any response. I'm
also not getting any exception. As a test text I'm passing on the whole
prototype javascript library, but even with a normal text it is showing the
same problem, so the problem shouldn't be the javascript code that is
getting passed.
So the whole javascript code (more than 144.000 characters are passed
succesfully with a post to the service. But the response doesn't come back.
The setup is pretty simple:
My JAXB class:
@XmlRootElement(name = "test")
@XmlAccessorType(XmlAccessType.FIELD)
public class testREST
{
@XmlElement
private String code;
//Needed for JAXB
public testREST ()
{
}
public String getCode()
{
return code;
}
public void setCode(String code)
{
this.code = code;
}
}
And the service:
@POST
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public testREST getJavascript( testREST resource)
{
testREST resp = new testREST ();
resp.setCode(resource.getCode());
return resource;
}
And the client:
Client client = Client.create();
client.setFollowRedirects(true);
WebResource resource = client.resource("urltotheresource");
testREST test = new testREST ();
test.setCode(request.getParameter("input")); //The input is the text that
comes from a textarea from a simple form.
testREST responseWebService = resource.post( testREST.class, test);
So is this a limitation, a bug, do I need to configure my client or am I
just doing something wrong?