CreateSoapSTSDeployment.jsp revision 3deb9260b3feeed415cebe3c379eb4e7ed17de62
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ The contents of this file are subject to the terms of the Common Development and
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ Distribution License (the License). You may not use this file except in compliance with the
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ specific language governing permission and limitations under the License.
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ When distributing Covered Software, include this CDDL Header Notice in each file and include
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ Header, with the fields enclosed by brackets [] replaced by your own identifying
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ~ information: "Portions copyright [year] [name of copyright owner]".
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko ~ Copyright 2015-2016 ForgeRock AS.
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan<%@ page info="CreateSoapSTSDeployment" language="java" %>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan<%@taglib uri="/WEB-INF/jato.tld" prefix="jato" %>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan<%@taglib uri="/WEB-INF/cc.tld" prefix="cc" %>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan<%@taglib tagdir="/WEB-INF/tags" prefix="console"%>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan<jato:useViewBean
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan className="com.sun.identity.console.task.CreateSoapSTSDeploymentViewBean"
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan fireChildDisplayEvents="true" >
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:i18nbundle baseName="amConsole" id="amConsole"
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:header name="hdrCommon" pageTitle="webconsole.title" bundleID="amConsole" copyrightYear="2015" fireDisplayEvents="true">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <link rel="stylesheet" type="text/css" href="../console/css/openam.css" />
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <script language="javascript" src="../console/js/am.js"></script>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <script language="javascript" src="../console/js/tasksPage.js"></script>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <script language="javascript" src="../com_sun_web_ui/js/dynamic.js"></script>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <div id="main" style="position: absolute; margin: 0; border: none; padding: 0; width:auto; height:101%;">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <div id="divhelp" style="display: none; position:absolute; margin: 0; border: 1px solid #AABCC8; padding: 0; width:400px; height:200px; background:#FCFCFC">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <table border=0 cellpadding=2 cellspacing=0 width="100%">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <tr><td width=99%><span id="divHelpmsg" /></td>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <td width="1%" valign="top">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <img src="../console/images/tasks/close.gif" width="16" height="16" onClick="hideHelp()" />
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:form name="CreateSoapSTSDeployment" method="post">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <jato:hidden name="szCache" />
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <script language="javascript">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan function confirmLogout() {
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan return confirm("<cc:text name="txtLogout" defaultValue="masthead.logoutMessage" bundleID="amConsole"/>");
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan function cancelOp() {
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan redirectToXui();
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan return false;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:primarymasthead name="mhCommon" bundleID="amConsole" logoutOnClick="return confirmLogout();" locale="<%=((com.sun.identity.console.base.AMViewBeanBase)viewBean).getUserLocale()%>"/>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <table border="0" cellpadding="10" cellspacing="0" width="100%">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:alertinline name="ialertCommon" bundleID="amConsole" />
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <%-- PAGE CONTENT --------------------------------------------------------- --%>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:pagetitle name="pgtitle" bundleID="amConsole" pageTitleText="page.title.configure.soapstsdeployment" showPageTitleSeparator="true" viewMenuLabel="" pageTitleHelpMessage="" showPageButtonsTop="true" showPageButtonsBottom="false" />
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <table border="0" cellpadding="20" cellspacing="0">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:text name="txtDesc" defaultValue="page.desc.configure.soapstsdeployment" bundleID="amConsole" />
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <cc:propertysheet name="propertyAttributes" bundleID="amConsole" showJumpLinks="false"/>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan </cc:header>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <div id="dlg" class="dvs"></div>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <console:redirectToXui realm="encodeURIComponent(frm.elements['CreateSoapSTSDeployment.tfRealm'].value)"
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan xuiPath="../XUI#realms/{realm}/dashboard"/>
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan <script language="javascript">
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var msgCreating = "<p><img src=\"../console/images/processing.gif\" width=\"66\" height\"66\"/></p><cc:text name="txtConfiguring" defaultValue="configuring.soapstsdeployment.waiting" bundleID="amConsole" escape="false" />";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var ttlCreated = "<h3><cc:text name="txtTtlCreated" defaultValue="soapstsdeployment.configured.title" escape="false" bundleID="amConsole" /></h3>";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var msgCreated = "<p> </p><input name=\"btnOK\" type=\"submit\" class=\"Btn1\" value=\"<cc:text name="txtOKBtn" defaultValue="ajax.ok.button" bundleID="amConsole" />\" onClick=\"redirectToXui();return false;\" /></div></p>";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var closeBtn = "<p> </p><p><div class=\"TtlBtnDiv\"><input name=\"btnClose\" type=\"submit\" class=\"Btn1\" value=\"<cc:text name="txtCloseBtn" defaultValue="ajax.close.button" bundleID="amConsole" />\" onClick=\"focusMain();return false;\" /></div></p>";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var frm = document.forms['CreateSoapSTSDeployment'];
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var btn1 = frm.elements['CreateSoapSTSDeployment.button1'];
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var btn2 = frm.elements['CreateSoapSTSDeployment.button2'];
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var ajaxObj = getXmlHttpRequestObject();
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var userLocale = "<%= viewBean.getUserLocale().toString() %>";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan function getData() {
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var realm = frm.elements['CreateSoapSTSDeployment.tfRealm'].value;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var openAMUrl = frm.elements['CreateSoapSTSDeployment.tfOpenAMUrl'].value;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var soapAgentName = frm.elements['CreateSoapSTSDeployment.tfSoapAgentName'].value;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var soapAgentPassword = frm.elements['CreateSoapSTSDeployment.tfSoapAgentPassword'].value;
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko var soapAgentRetryNumber = frm.elements['CreateSoapSTSDeployment.tfSoapAgentRetryNumber'].value;
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko var soapAgentRetryInitialInterval = frm.elements['CreateSoapSTSDeployment.tfSoapAgentRetryInitialInterval'].value;
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko var soapAgentRetryMultiplier = frm.elements['CreateSoapSTSDeployment.tfSoapAgentRetryMultiplier'].value;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var keystoreFileNamesSize = frm.elements['CreateSoapSTSDeployment.elKeystoreFileNames.listbox'].length;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var keystoreFileNames="";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan for (i=0;i<keystoreFileNamesSize-1;i++)
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan keystoreFileNames+=frm.elements['CreateSoapSTSDeployment.elKeystoreFileNames.listbox'].options[i].value + ",";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var wsdlFileNamesSize = frm.elements['CreateSoapSTSDeployment.elCustomWsdlFileNames.listbox'].length;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var wsdlFileNames="";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan for (i=0;i<wsdlFileNamesSize-1;i++)
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan wsdlFileNames+=frm.elements['CreateSoapSTSDeployment.elCustomWsdlFileNames.listbox'].options[i].value + ",";
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var params = "&realm=" + escapeEx(realm)
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan + "&openAMUrl=" + escapeEx(openAMUrl)
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan + "&soapAgentName=" + escapeEx(soapAgentName)
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan + "&soapAgentPassword=" + escapeEx(soapAgentPassword)
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko + "&soapAgentRetryNumber=" + escapeEx(soapAgentRetryNumber)
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko + "&soapAgentRetryInitialInterval=" + escapeEx(soapAgentRetryInitialInterval)
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko + "&soapAgentRetryMultiplier=" + escapeEx(soapAgentRetryMultiplier)
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan + "&keystoreFileNames=" + escapeEx(keystoreFileNames)
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan + "&wsdlFileNames=" + escapeEx(wsdlFileNames);
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan return params;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan function submitPage() {
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan document.getElementById('dlg').style.top = '300px';
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan document.getElementById('dlg').innerHTML = '<center>' +
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan msgCreating + '</center>';
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var params = 'locale=' + userLocale +
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan '&class=com.sun.identity.workflow.CreateSoapSTSDeployment' + getData();
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan ajaxPost(ajaxObj, url, params, configured);
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan return false;
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan function configured() {
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var result = hexToString(ajaxObj.responseText);
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var status = result.substring(0, result.indexOf('|'));
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var result = result.substring(result.indexOf('|') +1);
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan var msg = '<center><p>' + result + '</p></center>';
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan if (status == 0) {
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan msg = '<center>' + ttlCreated + msg + msgCreated + '</center>';
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan msg = msg + '<center>' + closeBtn + '</center>';
81ec9608aca5c5fb618d1c92ff435c2ad36f4770Dirk Hogan document.getElementById('dlg').innerHTML = msg;
3deb9260b3feeed415cebe3c379eb4e7ed17de62sachiko</jato:useViewBean>