Package org.apache.axis2.context

Examples of org.apache.axis2.context.ServiceContext


   */
  public static void closeSequence(ServiceClient serviceClient) throws SandeshaException {
   
    setUpServiceClientAnonymousOperations (serviceClient);
   
    ServiceContext serviceContext = serviceClient.getServiceContext();
    if (serviceContext == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.serviceContextNotSet));

    Options options = serviceClient.getOptions();
    if (options == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.optionsObjectNotSet));

    String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);

    if (rmSpecVersion == null)
      rmSpecVersion = SpecSpecificConstants.getDefaultSpecVersion();

    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);

    SOAPEnvelope closeSequnceEnvelope = configureCloseSequence(options, serviceContext.getConfigurationContext());
    OMElement closeSequenceBody = closeSequnceEnvelope.getBody().getFirstChildWithName(
        new QName(rmNamespaceValue, Sandesha2Constants.WSRM_COMMON.CLOSE_SEQUENCE));

    String oldAction = options.getAction();
    options.setAction(SpecSpecificConstants.getCloseSequenceAction(rmSpecVersion));
View Full Code Here


  // SandeshaException
  public static String getSequenceID(ServiceClient serviceClient) throws SandeshaException {

    String internalSequenceID = getInternalSequenceIdFromServiceClient(serviceClient);

    ServiceContext serviceContext = serviceClient.getServiceContext();
    if (serviceContext == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.serviceContextNotSet));

    ConfigurationContext configurationContext = serviceContext.getConfigurationContext();

    SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
    if (sequenceReport == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.cannotFindReportForGivenData, serviceClient.toString()));
View Full Code Here

    Options options = serviceClient.getOptions();
    if (options == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.optionsObjectNotSet));

    ServiceContext serviceContext = serviceClient.getServiceContext();
    if (serviceContext == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.serviceContextNotSet));

    ConfigurationContext configContext = serviceContext.getConfigurationContext();

    String rmSpecVersion = (String) options.getProperty(SandeshaClientConstants.RM_SPEC_VERSION);
    if (rmSpecVersion == null)
      rmSpecVersion = Sandesha2Constants.SPEC_VERSIONS.v1_0;
View Full Code Here

    String internalSequenceId = getInternalSequenceIdFromServiceClient(serviceClient);
   
    if (log.isTraceEnabled())
      log.trace("Looking up sequence with identifier " + internalSequenceId);
   
    ServiceContext serviceContext = serviceClient.getServiceContext();
    if (serviceContext == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.serviceContextNotSet));

    ConfigurationContext configurationContext = serviceContext.getConfigurationContext();

    // Get the in use storage manager and the sequence property bean manager
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
   
    Transaction transaction = null;
View Full Code Here

    String internalSequenceId = getInternalSequenceIdFromServiceClient(serviceClient);
   
    if (log.isTraceEnabled())
      log.trace("Looking up sequence with identifier " + internalSequenceId);
   
    ServiceContext serviceContext = serviceClient.getServiceContext();
    if (serviceContext == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(
          SandeshaMessageKeys.serviceContextNotSet));

    ConfigurationContext configurationContext = serviceContext.getConfigurationContext();

    // Get the in use storage manager and the sequence property bean manager
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
   
    // Create a transaction for the retrieve operation
View Full Code Here

        if (referenceMessage.getServiceContext()!=null) {
          newMessageContext.setServiceContext(referenceMessage.getServiceContext());
          newMessageContext.setServiceContextID(referenceMessage.getServiceContextID());
        } else {
          ServiceGroupContext sgc = newMessageContext.getServiceGroupContext();
          ServiceContext serviceContext = sgc.getServiceContext(referenceMessage.getAxisService());
          newMessageContext.setServiceContext(serviceContext);
        }
      }

      newMessageContext.setAxisOperation(operation);
View Full Code Here

      //adding an OperationContext if one is not available. (for e.g. If we are in the SandeshaGlobalInHandler)
      if (rmMsgCtx.getMessageContext().getOperationContext() == null) {
        // operation context will be null when doing in a GLOBAL
        // handler.
       
        ServiceContext serviceCtx = msgContext.getServiceContext();
        OperationContext opCtx =  OperationContextFactory.createOperationContext(ackOperation.getAxisSpecificMEPConstant(), ackOperation, serviceCtx);

        rmMsgCtx.getMessageContext().setOperationContext(opCtx);
      }
     
View Full Code Here

        Sandesha2Constants.MessageTypes.ACK,
        getRMVersion(),
        getMsgContext().getAxisService());
    getMsgContext().setAxisOperation(ackOperation);

    ServiceContext serviceCtx = getMsgContext().getServiceContext();
    OperationContext opcontext = OperationContextFactory.createOperationContext(ackOperation.getAxisSpecificMEPConstant(), ackOperation, serviceCtx);
    opcontext.setParent(getMsgContext().getServiceContext());

    getConfigurationContext().registerOperationContext(ackRequestRMMsg.getMessageId(), opcontext);
    getMsgContext().setOperationContext(opcontext);
View Full Code Here

            ac.addService(axisAnonymousService);
            phasesInfo.setOperationPhases(outInOperation);
        }
        ServiceGroupContext sgc = new ServiceGroupContext(cc,
            (AxisServiceGroup) ac.getService("__ANONYMOUS_SERVICE__").getParent());
        ServiceContext sc =
            sgc.getServiceContext(new AxisService("__ANONYMOUS_SERVICE__"));

        MessageContext mc = new MessageContext();
        mc.setConfigurationContext(sc.getConfigurationContext());
        ///////////////////////////////////////////////////////////////////////
        // filtering properties
        if (axisMsgCtx.getSoapAction() != null)
            mc.setSoapAction(axisMsgCtx.getSoapAction());
        if (axisMsgCtx.getWSAAction() != null)
View Full Code Here

        ConfigurationContext configurationContext = msgContext.getConfigurationContext();
        configurationContext.fillServiceContextAndServiceGroupContext(msgContext);

        setMsgContextProperties(request, response, service, msgContext);

        ServiceContext serviceContext = msgContext.getServiceContext();
        serviceContext.setProperty(ServiceContext.SERVICE_OBJECT, this.endpointInstance);

        try {
            if (!HTTPTransportUtils.isRESTRequest(contentType)) {
                HTTPTransportUtils.processHTTPPostRequest(msgContext,
                                                          request.getInputStream(),
View Full Code Here

TOP

Related Classes of org.apache.axis2.context.ServiceContext

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.