DaWickedRebel
Programmer
Hi all
Rather new to using SSL though not so much to Java itself.
I am attempting to connect to an outside vendor's Web Service via SSL and am getting the error "javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake"
Here are some snippets of my code:
and the call code:
My associate runs the exact same code on his machine and gets the expected result, but I get this error. Google has been less then helpful trying to track down a cause of this problem.
Has anyone ever dealt with this issue before, and if so could you point an SSL newbie in the right direction?
Thanks for any help.
Rather new to using SSL though not so much to Java itself.
I am attempting to connect to an outside vendor's Web Service via SSL and am getting the error "javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake"
Here are some snippets of my code:
Code:
public class ClientTEST extends TestCase {
public void testCall() {
try {
NewOrderResponseElement authResponse = null;
PaymentechGatewayLocator service = new PaymentechGatewayLocator(); //Next create a port from the service
PaymentechGatewayPortType portType = service.getPaymentechGateway(new URL("[URL unfurl="true"]https://theRealAddress/Gateway"));[/URL]
NewOrderRequestElement authBean = new NewOrderRequestElement();
authBean.setTransType("A");
authBean.setBin("000001");
authBean.setMerchantID("300003111111");
authBean.setTerminalID("001");
authBean.setAmount("1000");
authBean.setCcCardVerifyNum("2233");
authBean.setCcAccountNum("4055011111111111");
authBean.setComments("Test Web Service Auth Only Transaction");
authBean.setOrderID("testOrder101");
authBean.setIndustryType("EC");
//Invoke the newOrder service and get the response bean
authResponse = portType.newOrder(authBean);
//Print response Codes from the response bean
System.out.println("######### Response Received ##############");
System.out.println(" ProcStatus: " + authResponse.getProcStatus());
System.out.println(" ProcStatusMessage: " + authResponse.getProcStatusMessage());
System.out.println(" RespCode: " + authResponse.getRespCode());
System.out.println(" ApprovalStatus: " + authResponse.getApprovalStatus());
System.out.println(" AuthorizationCode: " + authResponse.getAuthorizationCode());
} catch (AxisFault ie) {
System.out.println("Fault Response: \n" + ie);
fail(ie.getMessage());
return;
} catch (Exception ie) {
System.out.println("Error Response: \n" + ie);
fail(ie.getMessage());
return;
}
}
}
and the call code:
Code:
public NewOrderResponseElement newOrder(NewOrderRequestElement newOrderRequest) throws java.rmi.RemoteException {
if (super.cachedEndpoint == null) {
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call call = createCall();
call.setOperation(_operations[0]);
call.setEncodingStyle(null);
call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
call.setOperationName(new javax.xml.namespace.QName("theRealAddress/Gateway", "NewOrder"));
setRequestHeaders(call);
setAttachments(call);
try { Object resp = call.invoke(new java.lang.Object[] {newOrderRequest}); <-------throws HandShakeException
if (resp instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)resp;
}
else {
extractAttachments(call);
try {
return (NewOrderResponseElement) resp;
} catch (Exception _exception) {
return (NewOrderResponseElement) org.apache.axis.utils.JavaUtils.convert(resp, NewOrderResponseElement.class);
}
}
} catch (org.apache.axis.AxisFault axisFaultException) {
throw axisFaultException;
}
}
My associate runs the exact same code on his machine and gets the expected result, but I get this error. Google has been less then helpful trying to track down a cause of this problem.
Has anyone ever dealt with this issue before, and if so could you point an SSL newbie in the right direction?
Thanks for any help.