Can anyone please let me know what does status code of 100 mean as a return
from client.executeMethod(post).
The result returns 100 and the subsequent code is not executed. I am not
able to retrieve the response as Stream.
Would appreciate if anyone can look at the code below to see if I have
missed anything that ought to be in the code.
This code is running under tomcat and is the alpha release before Release 2
beta 1.
StringBuffer responseBody = new StringBuffer("");
PostMethod method = null;
String translatedString = "";
// Create the new HttpClient object
client = new HttpClient();
//establish a connection within x seconds
client.setConnectionTimeout(connectionTimeout);
// Time it takes to receive the data after the connection is
established.
client.setTimeout(timeout);
//create a method object
method = new PostMethod(sTheURL);
// Set the request body with the xml request
method.setRequestBody(sXML);
// Set the request headers
method.setRequestHeader("Content-Type", " text/xml");
method.setRequestHeader("Content-Length",
translatedString.length() + "");
int result = client.executeMethod(method);
InputStream is = method.getResponseBodyAsStream();
BufferedReader br = new BufferedReader(new
InputStreamReader(is));
String line = null;
while ((line = br.readLine()) != null)
{
responseBody.append(line);
}
br.close();
//clean up the connection resources
method.releaseConnection();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]