<%! 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); rsr.setOrgRef(""); rsr.setParameters(new String[] {"yftoolbar=false", "hideheader=true", "hidefooter=true", "disablesidenav=true"}); rs = rssbs.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Success"); out.write("
URL: "); out.write("http://localhost:8080/logon.i4?LoginWebserviceId=" + rs.getLoginSessionId() + ""); } else { out.write("Failure"); } %>
Done.