信頼できる自己署名証明書を使用する必要がありますが、Java クライアントからの接続に問題があります。
自己署名証明書/pw を使用してトラスト ストアをセットアップしました。
私が問題を抱えているのは、wsse セキュリティ ヘッダーを Java Web サービス呼び出しに組み込む方法です。SSL 接続が確立された後、この自己署名証明書を SOAP ペイロードに含める必要があると言われました。
次のようにConfigurationContextを設定しています...実際のWebサービス呼び出しにセキュリティヘッダーを含めるにはどうすればよいですか...アドバイスしてください...ジムに感謝します
System.setProperty("javax.net.ssl.keyStore", "c:\\cvp.keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
ConfigurationContext ctx = getConfigurationContext(getMaxOutgoingConnections(appDir, getHostName(), LOBSB_TYPE));
String epLoc = getEndpointLocation(appDir, getHostName(), SERVICE_TYPE);
ListParticipantExport4_ListParticipantHttpServiceStub stub = new ListParticipantExport4_ListParticipantHttpServiceStub(ctx,epLoc);
/*
if (!setSecurityOptions(stub._getServiceClient())) {
throw new Exception("Error setting up security options!");
}
*/
int timeOut = getTimeout(appDir, getHostName(), SERVICE_TYPE);
if (timeOut > 0) {
//Only set the timeout value if greater
//than zero!
stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(timeOut);
}
ListParticipantDocument doc = ListParticipantDocument.Factory.newInstance();
ListParticipant part = ListParticipant.Factory.newInstance();
ListParticipantRequest req = ListParticipantRequest.Factory.newInstance();
ServiceAttributesType saType = ServiceAttributesType.Factory.newInstance();
saType.setApplicationIdentifier("IVR");
saType.setLogLevel(ServiceAttributesType.LogLevel.ERRORS);
saType.setVersion("1.0");
req.setServiceAttributes(saType);
ParticipantSelection partSel = ParticipantSelection.Factory.newInstance();
partSel.setAccountHolderSSN(accountHolderSSN);
req.setParticipantSelection(partSel);
part.setListParticipantRequest(req);
doc.setListParticipant(part);
long startTime = System.currentTimeMillis();
sharedlib.listparticipant_v3.ListParticipantResponseDocument respDoc = stub.listParticipant(doc);
long endTime = System.currentTimeMillis();
respTime = (endTime-startTime);
ResponseReturnStatusType retStatus = respDoc.getListParticipantResponse().getListParticipantResponse().getResponseReturnStatus();
returnCode = retStatus.getResponseReturnCode().getCode();
returnCodeName = retStatus.getResponseReturnCode().getCodeName();