Package xdtestsuite.server

Source Code of xdtestsuite.server.ValidateTestImpl

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

class ValidateTestImpl extends BaseBO implements ValidateTestImplSkeleton
{
  // class methods
 
  public void ejbHomeNoRqst(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
  }

  public void ejbHomeMandatoryRqst(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
  }

  public void ejbHomeMandatoryRqst(XMLDispatcherContext xdCtx, SString rqst)
    throws XMLDispatcherUserException, XMLDispatcherAppException
  {
  }

  public void ejbHomeOptionalRqst(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;
  }

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

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

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

  public void ejbPostCreateNoRqstCtor(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.CreateException
  {
  }


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

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


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

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

  // destructors

  public void destroy(XMLDispatcherContext xdCtx)
    throws XMLDispatcherUserException, XMLDispatcherAppException, javax.ejb.RemoveException
  {
  }
}
TOP

Related Classes of xdtestsuite.server.ValidateTestImpl

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.