Package xdtestsuite.server

Source Code of xdtestsuite.server.ValidateTestBean

/*
*-**************************************************************************-*
*
* 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;

import xdtestsuite.msgs.*;

public class ValidateTestBean extends ValidateTestBaseBean
{
  // class methods
 
  protected void ejbHomeNoRqstImpl(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
  }

  protected void ejbHomeMandatoryRqstImpl(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
  }

  protected void ejbHomeMandatoryRqstImpl(XMLDispatcherContext xdCtx, SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
  }

  protected void ejbHomeOptionalRqstImpl(XMLDispatcherContext xdCtx, SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
  }

  private SString makeRply(String value)
    throws XMLDispatcherUserException
  {
    SString rply;
    if (value.equals("noRply"))
    {
      rply = null;
    }
    else if (value.equals("validRply"))
    {
      rply = new SString();
      rply.value = "s";
    }
    else if (value.equals("invalidRply"))
    {
      rply = new SString();
    }
    else
    {
      throw new XMLDispatcherUserException("unexpected action: "+value);
    }
    return rply;
  }

  protected SString ejbHomeMandatoryRplyImpl(XMLDispatcherContext xdCtx, SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
    return makeRply(rqst.value);
  }

  protected SString ejbHomeOptionalRplyImpl(XMLDispatcherContext xdCtx, SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
    return makeRply(rqst.value);
  }

  // constructors
  //
  protected String ejbCreateNoRqstCtorImpl(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.CreateException
  {
    return "PK1";
  }

  protected void ejbPostCreateNoRqstCtorImpl(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.CreateException
  {
  }


  protected String ejbCreateMandatoryRqstCtorImpl(XMLDispatcherContext xdCtx, xdtestsuite.msgs.SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.CreateException
  {
    return "PK2";
  }

  protected void ejbPostCreateMandatoryRqstCtorImpl(XMLDispatcherContext xdCtx, xdtestsuite.msgs.SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.CreateException
  {
  }


  protected String ejbCreateOptionalRqstCtorImpl(XMLDispatcherContext xdCtx, xdtestsuite.msgs.SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.CreateException
  {
    return "PK3";
  }

  protected void ejbPostCreateOptionalRqstCtorImpl(XMLDispatcherContext xdCtx, xdtestsuite.msgs.SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.CreateException
  {
  }

  // destructors

  protected void destroyImpl(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.RemoveException
  {
  }

}
TOP

Related Classes of xdtestsuite.server.ValidateTestBean

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.