Note that there are some explanatory texts on larger screens.

plurals
  1. POUnconnected sockets not implemented
    primarykey
    data
    text
    <p>I have to access the webservice with 2 way authentication. Below is my approach.</p> <p>Created MyCustomSSLSocketFactory class.</p> <ol> <li>Loaded TrustManagers</li> <li>Loaded Keystore Managers</li> <li>Created SSL Context and SSL socket factory as below.</li> </ol> <p>I call this class method just before calling webservice method.</p> <p>Then i have done as below:-</p> <pre><code>AxisProperties.setProperty("axis.socketSecureFactory", "com.elipva.zephyr.twofa.util.MyCustomSSLSocketFactory"); Security.setProperty("ssl.SocketFactory.provider", "com.elipva.zephyr.twofa.util.MyCustomSSLSocketFactory"); SSLContext context = SSLContext.getInstance(protocolVersion); context.init(keyManagers, trustManagers, null); SSLSocketFactory socketFactory = context.getSocketFactory(); URL url = new URL(urlString); URLConnection connection = url.openConnection(); if (connection instanceof HttpsURLConnection) { ((HttpsURLConnection) connection) .setSSLSocketFactory(sslSocketFactory); connection.connect(); } </code></pre> <p>when i access the webservice it gives me below error.</p> <pre><code>org.apache.axis2.AxisFault: Unconnected sockets not implemented at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:203) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) </code></pre> <p>Please let me know if i am missing anything.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload