Package org.apache.axis2.context

Examples of org.apache.axis2.context.ServiceGroupContext


            // we will assume a Service and operations
            axisService = new AxisService(ANONYMOUS_SERVICE);
        }

        configurationContext.getAxisConfiguration().addService(axisService);
        serviceContext = new ServiceGroupContext(configurationContext,
                                                 axisService.getParent()).getServiceContext(axisService);
    }
View Full Code Here


            // register operation context and message context
            axisOperation.registerOperationContext(msgContext, operationContext);

            ServiceContext serviceContext = (ServiceContext) operationContext.getParent();
            ServiceGroupContext serviceGroupContext =
                    (ServiceGroupContext) serviceContext.getParent();

            msgContext.setServiceContext(serviceContext);
            msgContext.setServiceGroupContext(serviceGroupContext);
            msgContext.setServiceGroupContextId(serviceGroupContext.getId());
        } else {    // 2. if null, create new opCtxt
            operationContext = new OperationContext(axisOperation);

            axisOperation.registerOperationContext(msgContext, operationContext);
            if (msgContext.getServiceContext() != null) {
View Full Code Here

        }
        SessionContext sessionContext = msgContext.getSessionContext();
        String serviceGroupContextId = msgContext.getServiceGroupContextId();
        if (serviceGroupContextId != null && sessionContext != null) {
            //setting service group context which is teken from session context
            ServiceGroupContext serviceGroupContext = sessionContext.getServiceGroupContext(
                    serviceGroupContextId);
            if (serviceGroupContext != null) {
                //setting service group context
                msgContext.setServiceGroupContext(serviceGroupContext);
                // setting Service conetxt
                msgContext.setServiceContext(serviceGroupContext.getServiceContext(service));
                return;
            }
        }
        String scope = service.getScope();
View Full Code Here

        // TODO: This part is compelte mess .. I think we need to look closly at the ServiceGroups  ..time been this works
        configurationContext.getAxisConfiguration().addService(serviceDesc);

        AxisServiceGroup serviceGroup =
                new AxisServiceGroup(configurationContext.getAxisConfiguration());
        ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configurationContext,
                serviceGroup);
        ServiceContext serviceContext = new ServiceContext(serviceDesc, serviceGroupContext);
        WSDLOperation wsdlop = getOperation(operationname, endpoint);
        WSDLBindingOperation bop = binding.getBindingOperation(wsdlop.getName());
        Iterator elments = bop.getExtensibilityElements().iterator();
View Full Code Here

    }

    private static ServiceContext fillServiceContextAndServiceGroupContext(AxisService axisService,
                                                                           ConfigurationContext configurationContext) {
        String serviceGroupContextId = UUIDGenerator.getUUID();
        ServiceGroupContext serviceGroupContext = new ServiceGroupContext(configurationContext,
                axisService.getParent());

        serviceGroupContext.setId(serviceGroupContextId);
        configurationContext.registerServiceGroupContext(serviceGroupContext);

        return new ServiceContext(axisService, serviceGroupContext);
    }
View Full Code Here

            // register operation context and message context
//            axisOperation.registerOperationContext(msgContext, operationContext);
            axisOperation.registerMessageContext(msgContext, operationContext);

            serviceContext = (ServiceContext) operationContext.getParent();
            ServiceGroupContext serviceGroupContext =
                    (ServiceGroupContext) serviceContext.getParent();

            msgContext.setServiceContext(serviceContext);
            msgContext.setServiceGroupContext(serviceGroupContext);
            msgContext.setServiceGroupContextId(serviceGroupContext.getId());
        } else {    // 2. if null, create new opCtxt
            if (serviceContext == null) {
                // fill the service group context and service context info
                msgContext.getConfigurationContext().
                        fillServiceContextAndServiceGroupContext(msgContext);
View Full Code Here

                createAndFillContexts(service, msgContext, sessionContext);
                return;
            }
        }
        String serviceGroupName = msgContext.getAxisServiceGroup().getServiceGroupName();
        ServiceGroupContext serviceGroupContext =
                sessionContext.getServiceGroupContext(serviceGroupName);
        if (serviceGroupContext != null) {
            //setting service group context
            msgContext.setServiceGroupContext(serviceGroupContext);
            // setting Service context
            msgContext.setServiceContext(serviceGroupContext.getServiceContext(service));
        } else {
            createAndFillContexts(service, msgContext, sessionContext);
        }
        ServiceContext serviceContext = sessionContext.getServiceContext(service);
        //found the serviceContext from session context , so adding that into msgContext
View Full Code Here

    }

    private void createAndFillContexts(AxisService service,
                                       MessageContext msgContext,
                                       SessionContext sessionContext) throws AxisFault {
        ServiceGroupContext serviceGroupContext;
        AxisServiceGroup axisServiceGroup = service.getAxisServiceGroup();
        ConfigurationContext configCtx = msgContext.getConfigurationContext();
        serviceGroupContext = configCtx.createServiceGroupContext(axisServiceGroup);

        msgContext.setServiceGroupContext(serviceGroupContext);
        ServiceContext serviceContext = serviceGroupContext.getServiceContext(service);
        msgContext.setServiceContext(serviceContext);
        if (sessionContext != null) {
            sessionContext.addServiceContext(serviceContext);
            sessionContext.addServiceGroupContext(serviceGroupContext);
        }
View Full Code Here

    if (msgContext==null){
      System.out.println ("message context is null");
      return null;
    }
   
    ServiceGroupContext sgc = msgContext.getServiceGroupContext();
    if (sgc==null){
      System.out.println ("message context is null");
      return null;
    }
   
    String previousStr = (String) sgc.getProperty(Constants.CALCULATOR_PREVIOUS_KEY);
    if (previousStr==null) {
      System.out.println ("Previous is null");
      return null;
    }
   
View Full Code Here

    if (msgContext==null){
      System.out.println ("message context is null");
      return null;
    }
   
    ServiceGroupContext sgc = msgContext.getServiceGroupContext();
    if (sgc==null){
      System.out.println ("message context is null");
      return null;
    }
   
    String previousStr = (String) sgc.getProperty(Constants.CALCULATOR_PREVIOUS_KEY);
    if (previousStr==null) {
      System.out.println ("Previous is null");
      return null;
    }
   
View Full Code Here

TOP

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

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.