Go Back   Velocity Reviews > General Computer Discussion > Software
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
Old 02-03-2009, 05:28 AM   #1
Default Axis java client error "Unrecognized SSL message, plaintext connection"


Hi:
I try to ask a webservice to an https server through a proxy server using a simple webservice client in java (Axis), and get the error of "Unrecognized SSL message, plaintext connection". The client code does have Https.proxy properties setting.

Note that I am able to use web browser client to send the https requests via the proxy server. In the browser setting, the https proxy server port is sepcified as "443", and same setting to Https.proxyPort on the client code . Since the web browser client made a succesful request through the proxy server, I assumed "443" is the correct port number used in both proxy server port and the https server, correct?


I have stucked on the issue for a whole week. Am I miss anything?
Thanks in advance !!!

Below is the client code snippet:

String KEYSTORE_LOCATION = "c:/dir1/jre/lib/securityacerts";
System.setProperty("javax.net.ssl.trustStore", KEYSTORE_LOCATION);
System.getProperties().put("proxySet", "true");
System.getProperties().put("https.proxyHost", "proxyserver");
System.getProperties().put("https.proxyPort", "443");
String xmlRequest =ClmUtils.readLocalFile("C:/testdata/request");

Service service = new Service();
Call call = (Call) service.createCall();
call.setUsername("username") ;
call.setPassword("password") ;
options.setDefaultURL(WSDL_LOCATION);// the wsdl_location points to a https url

call.setTargetEndpointAddress( new URL(options.getURL()) );
SOAPBodyElement[] soapElementArr = new SOAPBodyElement[1];

org.w3c.dom.Document document = getXmlDocument(xmlRequest) ;
org.w3c.dom.Element eax = (document.getDocumentElement()) ;
soapElementArr[0] = new SOAPBodyElement(eax) ;
Vector outputVector = (Vector)call.invoke(soapElementArr);
SOAPBodyElement soapElement = (SOAPBodyElement) outputVector.get(0);
Element element = soapElement.getAsDOM();
String responseXml = XMLUtils.ElementToString(element);


Logs of error returned:
----------------------
Exception in thread "main" AxisFault
faultCode: {schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
faultActor:
faultNode:
faultDetail: {...}stackTrace:javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at com.sun.net.ssl.internal.ssl.InputRecord.handleUnk nownRecord(InputRecord.java:523)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Inpu tRecord.java:355)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRec ord(SSLSocketImpl.java:723)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.perform InitialHandshake(SSLSocketImpl.java:1030)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(SSLSocketImpl.java:1057)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(SSLSocketImpl.java:1041)
at org.apache.axis.components.net.JSSESocketFactory.c reate(JSSESocketFactory.java:186)
at org.apache.axis.transport.http.HTTPSender.getSocke t(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToS ocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(H TTPSender.java:13
at org.apache.axis.strategies.InvocationStrategy.visi t(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain .java:11
at org.apache.axis.SimpleChain.invoke(SimpleChain.jav a:83)
at org.apache.axis.client.AxisClient.invoke(AxisClien t.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java :2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:1792)


joeandmav
joeandmav is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
TURN $5 INTO $15,000 IN ONLY 30 DAYS...HERES HOW! mosquitonose@hotmail.com DVD Video 1 01-19-2006 12:58 AM
TURN $5 INTO $15,000 IN ONLY 30 DAYS...HERES HOW! mosquitonose@hotmail.com DVD Video 0 01-18-2006 10:32 PM
Turn $6 into $60000 GARANTEED!!! Zachary Keller DVD Video 2 10-08-2003 09:58 PM
Postal Lottery: Turn $6 into $60,000 in 90 days, GUARANTEED Louis DVD Video 0 09-30-2003 07:26 PM
Turn $6 into $60,000 in 90 days, GUARANTEED T.L.F. DVD Video 0 09-18-2003 07:14 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46