%! 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..
*/
String host = "localhost";
Integer port = 8080;
String context = "/yellowfin73";
AdministrationServiceResponse rs = null;
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
AdministrationServiceService ts = new AdministrationServiceServiceLocator(host, 8080, context + "/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");
rsr.setOrgRef("");
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("admin@yellowfin.com.au");
ap.setPassword("test");
rsr.setPerson(ap);
rsr.setParameters(new String[] { "LOGOUTPAGE=/info.jsp" });
rs = rssbs.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Success");
out.write("
URL: ");
out.write("http://" + host + ":" + port + context + "/logon.i4?LoginWebserviceId=" + rs.getLoginSessionId() + "");
} else {
out.write("Failure");
}
%>
Done.