Package org.apache.axis2.context

Examples of org.apache.axis2.context.ServiceGroupContext


    private static ServiceContext fillServiceContextAndServiceGroupContext(AxisService axisService,
                                                                           ConfigurationContext configurationContext)
            throws AxisFault {
        String serviceGroupContextId = UIDGenerator.generateURNString();
        ServiceGroupContext serviceGroupContext =
                configurationContext.createServiceGroupContext(axisService.getAxisServiceGroup());

        serviceGroupContext.setId(serviceGroupContextId);
        configurationContext.addServiceGroupContextIntoSoapSessionTable(serviceGroupContext);
        return serviceGroupContext.getServiceContext(axisService);
    }
View Full Code Here


        if (!configurationContext.getPropertyDifferences().isEmpty()) {
            contexts.add(configurationContext);
        }

        // Do we need to replicate state stored in ServiceGroupContext?
        ServiceGroupContext sgContext = msgContext.getServiceGroupContext();
        if (sgContext != null && !sgContext.getPropertyDifferences().isEmpty()) {
            contexts.add(sgContext);
        }

        // Do we need to replicate state stored in ServiceContext?
        ServiceContext serviceContext = msgContext.getServiceContext();
View Full Code Here

        AxisConfiguration axisCfg       = axisCfgCtx.getAxisConfiguration();

        AxisService anoymousService =
            AnonymousServiceFactory.getAnonymousService(
            axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
        ServiceGroupContext sgc = new ServiceGroupContext(
            axisCfgCtx, (AxisServiceGroup) anoymousService.getParent());
        ServiceContext serviceCtx = sgc.getServiceContext(anoymousService);

        // get a reference to the DYNAMIC operation of the Anonymous Axis2 service
        AxisOperation axisAnonymousOperation = anoymousService.getOperation(
            new QName(AnonymousServiceFactory.DYNAMIC_OPERATION));
View Full Code Here

    }

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

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

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

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

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

            // register operation context and message context
            axisOperation.registerOperationContext(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
            operationContext = new OperationContext(axisOperation);

            axisOperation.registerOperationContext(msgContext, operationContext);
            if (serviceContext != 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

        if (soapHeader != null) {
            OMElement serviceGroupId = soapHeader.getFirstChildWithName(new QName(Constants.AXIS2_NAMESPACE_URI,
                    Constants.SERVICE_GROUP_ID, Constants.AXIS2_NAMESPACE_PREFIX));
            if (serviceGroupId != null) {
                String groupId = serviceGroupId.getText();
                ServiceGroupContext serviceGroupContext = msgContext.getConfigurationContext().
                        getServiceGroupContext(groupId, msgContext);
                if (serviceGroupContext == null) {
//                handleNoServiceGroupContextIDCase(msgContext);
                    throw new AxisFault(Messages.getMessage(
                            "invalidservicegrouoid", groupId));
View Full Code Here

        }

        // create a service context for myself: create a new service group
        // context and then get the service context for myself as I'll need that
        // later for stuff that I gotta do
        ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
                this.axisService.getParent());
        this.serviceContext = sgc.getServiceContext(this.axisService);
    }
View Full Code Here

            axisService = ClientUtils.creatAxisService(wsdlURL, wsdlServiceName, portName, options);
            // add the service to the config context if it isn't in there already
            if (this.axisConfig.getService(this.axisService.getName()) == null) {
                this.axisConfig.addService(this.axisService);
            }
            ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
                    this.axisService.getParent());
            this.serviceContext = sgc.getServiceContext(this.axisService);
        } catch (IOException e) {
            throw new AxisFault(e);
        }
    }
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.