my code is in attach and is very simple. I don't have subclassed PostMethod in my application.
Michael, the missing 'u' in the log is cut&paste problem, when I clear the user/pass from the log. Sorry
I change the user/pass because the system is a production system and I don't have a test environment
Maybe the ISA proxy can generate the problem?
Albert ---------------------------- package getpost;
import org.apache.commons.httpclient.*; import org.apache.commons.httpclient.methods.*; import java.io.*;
public class SMSHTTP {
public void test5() throws Exception {
System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog");
System.setProperty("org.apache.commons.logging.simplelog.showdatetime", "true");
System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug");
System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "debug");
HttpClient httpclient = new HttpClient();
httpclient.getHostConfiguration().setHost("www.smsexecutive.it", 80, "http");
PostMethod post = new PostMethod("/new/index1.php");
NameValuePair[] data = {
new NameValuePair("username", "xxx"),
new NameValuePair("password", "xxx")
}; post.setRequestBody(data);
httpclient.executeMethod(post);
System.out.println(post.getResponseBodyAsString());
System.out.println("result POST: " + post.getStatusLine().toString()); GetMethod get = new GetMethod("/new/sx.php");
httpclient.executeMethod(get);
System.out.println("result GET: " + get.getStatusLine().toString());System.err.println(get.getResponseBodyAsString());
httpclient.endSession();
}
public static void main(String[] args) throws Exception {
SMSHTTP s = new SMSHTTP();
s.test5();
}}
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
