Package xdtestsuite.server

Source Code of xdtestsuite.server.SessionTestImpl

/*
*-**************************************************************************-*
*
* XOo°f - http://www.xooof.org
* A development and XML specification framework for documenting and
* developing the services layer of enterprise business applications.
* From the specifications, it generates WSDL, DocBook, client-side and
* server-side code for Java, C# and Python.
*
* Copyright (C) 2006 Software AG Belgium
*
* This file is part of XOo°f.
*
* XOo°f is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* XOo°f is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*
*-**************************************************************************-*
*/

package xdtestsuite.server;


import org.xooof.xmldispatcher.interfaces.XMLDispatcherAppException;
import org.xooof.xmldispatcher.interfaces.XMLDispatcherUserException;
import org.xooof.xmldispatcher.servers.XMLDispatcherContext;

class SessionTestImpl extends BaseBO implements SessionTestImplSkeleton
{
  // class methods
 
  public void ejbHomeLogon(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
    xdCtx.setSession(new SessionData("TOTO"));
  }

  public void ejbHomeCheckLogon(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
    SessionData sess = (SessionData)xdCtx.getSession();
    if (sess == null)
    {
      throw new XMLDispatcherUserException("not logged on");
    }
    else
    {
      if (!sess.getUserId().equals("TOTO"))
      {
        throw new XMLDispatcherUserException("wrong userId in session");
      }
      else
      {
        // ok
      }
    }
  }


  // constructors (default interface)
 

  // instance methods (default interface)
 

}
TOP

Related Classes of xdtestsuite.server.SessionTestImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.