Hi, I have been given an api which states that it requires:
URL http://server/a/messages.xml HTTP Method POST (even though the soapui example of this call uses PUT) Input XML <?xml version="1.0" encoding="UTF-8"?> <message> <content>Post message</content> <parent-id nil="true"></parent-id> </message>
Now i have tried to use the following code (where request body is the xml as seen above with no \r\n in)
PutMethod putMethod = null;
putMethod = new PutMethod(url);
putMethod.setQueryString(requestParams);
RequestEntity rEnt = new StringRequestEntity(requestBody,"text/xml",null);
putMethod.setRequestEntity(rEnt);
statusCode = client.executeMethod(putMethod);
I keep getting back 500 from the status, I know it works as the soapui example (put) works.
Any ideas what small thing I am missing. (I am going to try post too)
Thanks