Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSLHandshake Error!

Status
Not open for further replies.

FOR111

Programmer
Sep 29, 2005
103
MT
Hi All,

I'm trying to connect to a webservice and using a post command retrieving a string with the results. This worked fine until the WebService was changed to a HTTPS. then i started having problems when connection was being achieved and giving me a SSLHandShake error:

My current code consists of the following:

Code:
PostMethod post = null;
HttpClient httpclient = new HttpClient();
    	    
    	         	    
    	    post = new PostMethod(server+"/"+action);
    		post.addParameters(parameters);
   
    		
    		post.setRequestHeader("Host", "xxx.com");
    		post.setRequestHeader("Content-Type", "application/x-[URL unfurl="true"]www-form-urlencoded");[/URL]
    	   
           	int result = httpclient.executeMethod(post);
           	
            if (result != 200)
            	throw new WebServiceException(post.getResponseBodyAsString());
             
            String response = post.getResponseBodyAsString();
            return response;


Any help would be great thanks.

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top