Package org.apache.axis2.description

Examples of org.apache.axis2.description.Parameter


  private static SecurityManager getSecurityManagerInstance (String className,ConfigurationContext context) throws SandeshaException {
    try {
      ClassLoader classLoader = null;
      AxisConfiguration config = context.getAxisConfiguration();
      Parameter classLoaderParam = config.getParameter(Sandesha2Constants.MODULE_CLASS_LOADER);
      if(classLoaderParam != null) classLoader = (ClassLoader) classLoaderParam.getValue();

      if (classLoader==null)
        throw new SandeshaException (SandeshaMessageHelper.getMessage(SandeshaMessageKeys.classLoaderNotFound));
       
      Class c = classLoader.loadClass(className);
View Full Code Here


    }     
   
    if(!result) {
      //look at the operation
      if (mc.getAxisOperation() != null) {
        Parameter unreliableParam = mc.getAxisOperation().getParameter(SandeshaClientConstants.UNRELIABLE_MESSAGE);
        if (null != unreliableParam && "true".equals(unreliableParam.getValue())) {
          if (log.isDebugEnabled()) log.debug("Unreliable operation");
          result = true;
        }
      }
    }
View Full Code Here

    if (log.isDebugEnabled())
      log.debug("Enter: CreateSeqMsgProcessor::processInMessage");

    try {
      if (createSeqRMMsg.getMessageContext().getAxisService() != null) {
        Parameter unreliableParam = createSeqRMMsg.getMessageContext().getAxisService().getParameter(SandeshaClientConstants.UNRELIABLE_MESSAGE);
        if (null != unreliableParam && "true".equals(unreliableParam.getValue())) {
          FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg,
              SandeshaMessageHelper.getMessage(SandeshaMessageKeys.reliableMessagingNotEnabled, createSeqRMMsg.getMessageContext().getAxisService().getName()),
              new Exception());
         
          log.debug("Exit: CreateSeqMsgProcessor::processInMessage, Service has disabled RM " + false);
View Full Code Here

      log.debug("Enter: SandeshaGlobalInHandler::invoke, " + msgContext.getEnvelope().getHeader());

    // look at the service to see if RM is totally disabled. This allows the user to disable RM using
    // a property on the service, even when Sandesha is engaged.
    if (msgContext.getAxisService() != null) {
      Parameter unreliableParam = msgContext.getAxisService().getParameter(SandeshaClientConstants.UNRELIABLE_MESSAGE);
      if (null != unreliableParam && "true".equals(unreliableParam.getValue())) {
        log.debug("Exit: SandeshaGlobalInHandler::invoke, Service has disabled RM " + InvocationResponse.CONTINUE);
        return InvocationResponse.CONTINUE;
      }
    }
View Full Code Here

    if(log.isDebugEnabled()) log.debug("Entry: SandeshaModule::init, " + configContext);

    AxisConfiguration config = configContext.getAxisConfiguration();

    //storing the Sandesha module as a parameter.
    Parameter parameter = new Parameter(Sandesha2Constants.MODULE_CLASS_LOADER,module.getModuleClassLoader());
    config.addParameter(parameter);

    //init the i18n messages
    SandeshaMessageHelper.innit();
   
    //storing the module as a static variable
    SandeshaUtil.setAxisModule(module);
   
    // continueUncompletedSequences (storageManager,configCtx);

    SandeshaPolicyBean constantPropertyBean = PropertyManager.loadPropertiesFromDefaultValues();
    SandeshaPolicyBean propertyBean = PropertyManager.loadPropertiesFromModuleDescPolicy(module,constantPropertyBean);
   
    if (propertyBean==null) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.couldNotLoadModulePolicies);
      log.error (message);
     
      propertyBean = PropertyManager.loadPropertiesFromDefaultValues();
    } else {
      if (log.isDebugEnabled()) {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.modulePoliciesLoaded);
        log.info (message);
      }
    }
   
    parameter = new Parameter (Sandesha2Constants.SANDESHA_PROPERTY_BEAN, propertyBean);
    config.addParameter(parameter);
   
    // Reset both storage managers
    parameter = config.getParameter(Sandesha2Constants.INMEMORY_STORAGE_MANAGER);
    if(parameter != null) config.removeParameter(parameter);
View Full Code Here

    SandeshaPolicyBean parentPropertyBean = SandeshaUtil.getPropertyBean(axisDescription.getParent());
   
    SandeshaPolicyBean axisDescPropertyBean = PropertyManager.loadPropertiesFromAxisDescription(axisDescription,parentPropertyBean);
   
    if (axisDescPropertyBean!=null) {
      Parameter parameter = new Parameter ();
      parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
      parameter.setValue(axisDescPropertyBean);
      axisDescription.addParameter(parameter);
    }
   
    // When we engage Sandesha for a Service, we check to see if there are
    // any OUT_IN MEPs on it's operations. If there are then we record that,
    // so that we know we should send an Offer for WSRM 1.0 Sequences.
    // We check the operation names, as the RM operations are added in as
    // well, and and we only want to consider the user's operations.
    if(axisDescription instanceof AxisService) {
      AxisService service = (AxisService) axisDescription;
      Iterator ops = service.getOperations();
      while(ops.hasNext()) {
        AxisOperation op = (AxisOperation) ops.next();
        log.debug("Examining operation " + op.getName() + ", mep " + op.getMessageExchangePattern());

        String name = null;
        QName qName = op.getName();
        if(qName != null) name = qName.getLocalPart();
        if((name != null && name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) ||
           ServiceClient.ANON_OUT_IN_OP.equals(qName))
          break;

        // If we get to here then we must have one of the user's operations, so
        // check the MEP.
        if(op.getAxisSpecifMEPConstant() == WSDLConstants.MEP_CONSTANT_OUT_IN) {
          Parameter p = new Parameter(Sandesha2Constants.SERVICE_CONTAINS_OUT_IN_MEPS, Boolean.TRUE);
          service.addParameter(p);
          break;
        }
      }
    } else if(axisDescription instanceof AxisOperation) {
      AxisOperation op = (AxisOperation) axisDescription;
      log.debug("Examining operation " + op.getName() + ", mep " + op.getAxisSpecifMEPConstant());

      String name = null;
      QName qName = op.getName();
      if(qName != null) name = qName.getLocalPart();
      if((name != null && !name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) &&
         !ServiceClient.ANON_OUT_IN_OP.equals(qName)) {

        // If we get to here then we must have one of the user's operations, so
        // check the MEP.
        if(op.getAxisSpecifMEPConstant() == WSDLConstants.MEP_CONSTANT_OUT_IN) {
          Parameter p = new Parameter(Sandesha2Constants.SERVICE_CONTAINS_OUT_IN_MEPS, Boolean.TRUE);
          op.getParent().addParameter(p);
        }
      }
    }
View Full Code Here

    // Check if this service includes 2-way operations
    boolean twoWayService = false;
    AxisService service = applicationMsgContext.getAxisService();
    if(service != null) {
      Parameter p = service.getParameter(Sandesha2Constants.SERVICE_CONTAINS_OUT_IN_MEPS);
      if(p != null && p.getValue() != null) {
        twoWayService = ((Boolean) p.getValue()).booleanValue();
      }
    }
   
    // Adding sequence offer - if present. We send an offer if the client has assigned an
    // id, or if we are using WS-RM 1.0 and the service contains out-in MEPs
View Full Code Here

    } else {
      // in the client side, user will set the RM version.
      specVersion = (String) applicationMessage.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
     
      // If the spec version is null, look in the axis operation to see value has been set
      Parameter opLevel = applicationMessage.getAxisOperation().getParameter(SandeshaClientConstants.RM_SPEC_VERSION);
      if (specVersion == null && opLevel != nullspecVersion = (String) opLevel.getValue();           
    }

    if (specVersion == null)
      // TODO change the default to v1_1
      specVersion = SpecSpecificConstants.getDefaultSpecVersion();
View Full Code Here

    }

    public void setUp() throws Exception {
        AxisConfiguration axisConfig = new AxisConfiguration();
        SandeshaPolicyBean propertyBean = PropertyManager.loadPropertiesFromDefaultValues();
        Parameter parameter = new Parameter ();
        parameter.setName(Sandesha2Constants.SANDESHA_PROPERTY_BEAN);
        parameter.setValue(propertyBean);
        axisConfig.addParameter(parameter);
       
        ConfigurationContext configCtx = new ConfigurationContext(axisConfig);
       
        ClassLoader classLoader = getClass().getClassLoader();
        parameter = new Parameter(Sandesha2Constants.MODULE_CLASS_LOADER,classLoader);
        axisConfig.addParameter(parameter);
       
        StorageManager storageManager = SandeshaUtil.getInMemoryStorageManager(configCtx);
        transaction = storageManager.getTransaction();
        mgr = storageManager.getRMDBeanMgr();
View Full Code Here

    private String getServiceImplClassName(MessageContext mc) {
        // The PARAM_SERVICE_CLASS property that is set on the AxisService
        // will tell us what the service implementation class is.
        org.apache.axis2.context.MessageContext axisMsgContext = mc.getAxisMessageContext();
        AxisService as = axisMsgContext.getAxisService();
        Parameter param = as.getParameter(org.apache.axis2.Constants.SERVICE_CLASS);

        // If there was no implementation class, we should not go any further
        if (param == null) {
            throw ExceptionFactory.makeWebServiceException(Messages.getMessage(
                    "EndpointControllerErr2"));
        }

        String className = ((String)param.getValue()).trim();
        return className;
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.description.Parameter

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.