Axis java client error "Unrecognized SSL message, plaintext connection"

Discussion in 'Software' started by joeandmav, Feb 3, 2009.

  1. joeandmav

    joeandmav

    Joined:
    Jan 28, 2009
    Messages:
    1
    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.handleUnknownRecord(InputRecord.java:523)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:355)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1057)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1041)
    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
    at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
    at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.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, Feb 3, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kimball K Kinnison

    Axis Network Camera Help

    Kimball K Kinnison, Oct 3, 2003, in forum: Computer Support
    Replies:
    0
    Views:
    438
    Kimball K Kinnison
    Oct 3, 2003
  2. AvengerĀ©

    Re Multiple Spammer Axis Computers

    AvengerĀ©, Jul 12, 2004, in forum: Computer Support
    Replies:
    4
    Views:
    471
    Ionizer
    Jul 12, 2004
  3. Faelan

    Axis Dialer

    Faelan, Sep 19, 2004, in forum: Computer Security
    Replies:
    5
    Views:
    889
    Quaoar
    Sep 19, 2004
  4. Shawn

    mouse cursor X/Y-axis speed

    Shawn, Feb 8, 2007, in forum: Computer Information
    Replies:
    0
    Views:
    531
    Shawn
    Feb 8, 2007
  5. clusardi2k@aol.com

    Vehicle's sensitive and range axis

    clusardi2k@aol.com, Apr 5, 2006, in forum: Digital Photography
    Replies:
    6
    Views:
    339
    Mark B.
    Apr 7, 2006
Loading...

Share This Page