Package org.pentaho.platform.plugin.services.webservices

Examples of org.pentaho.platform.plugin.services.webservices.AxisServletHooks


    // get an operation by name, if possible
    AxisOperation axisOperation = axisService.getOperationByAction( operationName );
    OperationContext operationContext = serviceContext.createOperationContext( axisOperation );

    // create an object to hook into Axis and give it everything we have
    AxisServletHooks hooks = new AxisServletHooks();
    hooks.setContext( context );
    hooks.setServletConfig( servletConfig );
    hooks.setConfiguration( axisConfiguration );
    hooks.initContextRoot( request );
    hooks.setAxisService( axisService );
    hooks.setAxisOperation( axisOperation );
    hooks.setOperationContext( operationContext );
    hooks.setServiceContext( serviceContext );
    hooks.setAxisOperation( axisOperation );
    hooks.setOperationContext( operationContext );
    // now execute the operation
    if ( request != null && response != null ) {
      try {
        PentahoSessionHolder.setSession( userSession );
        String method = request.getMethod();
        if ( "GET".equalsIgnoreCase( method ) ) { //$NON-NLS-1$
          hooks.handleGet( method, request, response );
        } else if ( "POST".equalsIgnoreCase( request.getMethod() ) ) { //$NON-NLS-1$
          hooks.handlePost( method, request, response );
        } else if ( "PUT".equalsIgnoreCase( request.getMethod() ) ) { //$NON-NLS-1$
          hooks.handlePut( method, request, response );
        }
      } catch ( Exception e ) {
        processAxisFault( hooks.getMessageContext(), out, e );
        error( Messages.getInstance().getErrorString( "RunService.ERROR_0001_ERROR_DURING_EXECUTION" ), e ); //$NON-NLS-1$
      }
    }

  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.plugin.services.webservices.AxisServletHooks

Copyright © 2018 www.massapicom. 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.