I need to send XML data to a URL. The XML data is contained in a stringbuffer. I need to post it and get the response code.
Can anyone tell me how to do it?
I have a piece of code, but eclipse says its deprecated
PostMethod postMethod = new PostMethod(URL);
InputStream stream = new StringBufferInputStream(command);
postMethod.setRequestBody(stream);