The subscription should go through almost immediately. If you are subscribed you will get this email twice.
Also, Dheeraj it would help if you could give a more detailed example of what you are doing and what it not working. In particular a test case that fails for you and that we could try would be good. A detailed log of the failure you are seeing would also help (see http://jakarta.apache.org/commons/httpclient/logging.html).
Does anyone with some NTLM knowledge want to take this question?
Thanks,
Mike
Dj wrote:
Hi Mike:
I have applied for the subscription, Does it take sometime to get approved. Yes I am able to to any other page by using the same code and even the simple authentication of the Tomcat. It is in particular that this code is giving me trouble. I have seen few people struggling with NTLM. Can you please furnish a working code for NTLM ?
Regards,
Dheeraj ----- Original Message ----- From: "Michael Becke" <[EMAIL PROTECTED]> To: "Dheeraj" <[EMAIL PROTECTED]> Sent: Thursday, February 27, 2003 12:19 AM Subject: Re: HTTPClient query
Hi Dheeraj,
To be able to post questions to the mailing list you have to be subscribed. You can do that here:
http://jakarta.apache.org/site/mail2.html
Are you hitting https://websmp203.sap-ag.de/ through a proxy? If so, you you will need to setup the HttpClient instance for the proxy. You will also need to supply NTLM credentials if it is an NTLM proxy. Are you able to connect to other pages on this site besides the login page?
Mike
Dheeraj wrote:
Hi Mike:
Thanks for your reply. I have posted the question to groups too. I am trying to log the site https://websmp203.sap-ag.de/login which is authenticated by a proxy or NTLM. This would make it clear what I want. I have tried both UsernamePasswordCredentials, and the NTCredentials. I get a null at the line, and throws exception. However sometimes it returns 404 too, though the site is there. // execute the GET int status = client.executeMethod( get );
My code does work for HTTP, HTTPS (with out authentication) , and authentication for Tomcat.
I hope I am sufficiently clear. Would you please solve the mystery,
Thank You
Dheeraj
Following are the details with respect to the problem.
package com.kcit.jakarta;
import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.SimpleHttpConnectionManager; import org.apache.commons.httpclient.HostConfiguration; import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.PostMethod;
public class BasicAuthenticatonExample {
public BasicAuthenticatonExample() { }
public static void main(String[] args) throws Exception { HttpClient client = new HttpClient(); client.setConnectionTimeout(100000000);
client.getState().setCredentials( "SAP Service Marketplace", new UsernamePasswordCredentials(<my-usesr-id>,
<password> )
);
GetMethod get = new GetMethod("https://websmp203.sap-ag.de/login");
get.setDoAuthentication(true);
// execute the GET int status = client.executeMethod( get );
// print the status and response System.out.println(status + "\n"
+get.getResponseBodyAsString());
// release any connection resources used by the method get.releaseConnection(); } }
----- Original Message ----- *From:* Michael Becke <mailto:[EMAIL PROTECTED]> *To:* Dj <mailto:[EMAIL PROTECTED]> *Sent:* Wednesday, February 26, 2003 7:18 PM *Subject:* Re: HTTPClient query
Hello Dheeraj,
If you could, please provide more information about what you are
trying
and what is failing. A test case that shows the problem is always good. Also, please post the question to the HttpClient mailing list
at
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> (you will have to subscribe first). This will ensure that others can benefit from any possible solution.
A http 404 response means that the file was not found. Are you sure that you are posting to a URL that exists?
Mike
On Wednesday, February 26, 2003, at 12:33 AM, Dj wrote:
> Hi Michael: > > Please refer it to /commons/HTTPClient and a sample program written by > you BasicAuthenticatonExample.java. > I am able to run this program for > 1. simple HTTP > 2. HTTPS > 3. HTTP with Basic authenticator - tested on Tomcat's Manager. > > I am stuck as I wish to hook on to a site which has a Basic > authentication with HTTPS. All the while I get a 404 Screen. > Would you please help me with it. You code is very easy to
implement
> except for this case. > > I need to make this tool very urgently. A quick technical help by
is
> highly appreciated. > > Thank You, > > > Dheeraj Srivastava
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]