I have created a trustore with certificates and keystore with the private key. i have put the following code, loaded the trsustore manger and keystore manager and then created the instance of SSL Context.
This below code is called whenever i am making a request to webservice. We are using axis2 API.
SSLContext context = SSLContext.getInstance(protocolVersion);
context.init(keyManagers, trustManagers, null);
SSLSocketFactory socketFactory = context.getSocketFactory();
SslContextedSecureProtocolSocketFactory secureProtocolSocketFactory = new SslContextedSecureProtocolSocketFactory(context);
Protocol authhttps = new Protocol("https", secureProtocolSocketFactory, port);
HttpClient httpclient = new HttpClient();
httpclient.getHostConfiguration().setHost(hostname, port, authhttps);
GetMethod httpget = new GetMethod("/RTAPService/RTAPService");
Tried with this as well GetMethod httpget = new GetMethod("/");
httpclient.executeMethod(httpget);
它给我留下以下错误。
org.apache.axis2.AxisFault: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
东道名称为“qartap.csnet.assurity.sg”和我的网络服务URL为“
问题是,在我登记“吉大港定居”议定书时,它会影响我的整个申请,能否将议定书规定给某个特定东道国或某个特定网络服务?
Either i want to set this using hostname or creating new protocol itself...I tried the approach given in the solution here. But it gave me the following exception..
在将“URl”网络服务传给生成的构造者时,我用自己定制的“MHTTPS”取代“HTTPS”。
The system cannot infer the transport information from the myhttps://serverUrl:7001/app/services/RTAPDevService.RTAPDevServiceHttpSoap12Endpoint/ URL.