%! private static final String cvsId = "$Id: ws_admin_singlesignon.jsp,v 1.1 2012/02/17 02:26:51 steve Exp $"; %>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.hof.util.*, java.util.*, java.text.*" %>
<%@ page import="com.hof.web.form.*" %>
<%@ page import="com.hof.mi.web.service.*" %>
<%
/*
Single Sign On over webservices.
Using Java generated stubs rather that using the Yellowfin webservices API..
*/
AdministrationServiceResponse rs = null;
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceService ts = new AdministrationServiceServiceLocator("localhost", 8080, "/services/AdministrationService", false);
AdministrationServiceSoapBindingStub rssbs = (AdministrationServiceSoapBindingStub) ts.getAdministrationService();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setFunction("LOGINUSER");
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("admin@yellowfin.com.au");
ap.setPassword("test");
rsr.setPerson(ap);
rs = rssbs.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
out.write("
URL: ");
out.write("http://localhost:8074/logon.i4?LoginWebserviceId=" + rs.getLoginSessionId() + "&yftoolbar=false&entry=VIEWDASHBOARD&DASHBOARDUUID=1e68d9cc-fa5a-44e2-816d-782aa40ceeae");
} else {
out.write("Failure");
}
%>
Done.