Package org.apache.axis2.description

Examples of org.apache.axis2.description.ServiceDescription


            if (iterator.hasNext()) {
                // remove <wsdl:service> and <wsdl:binding> elements from the service
                // description we read in as we will be replacing them anyway.
                WSDLServiceImpl serviceimpl = (WSDLServiceImpl)
                        womDescription.getServices().get(iterator.next());
                ServiceDescription service = new ServiceDescription(serviceimpl);
                service.setName(serviceimpl.getName());
                service.setWSDLDefinition(wsdlVersionWrapper.getDefinition());
                depengine.getCurrentFileItem().addService(service);
            }
        } catch (WSDLException e) {
            throw new DeploymentException(e);
        }
View Full Code Here


        String rootelementName;
        builder = new DescriptionBuilder(zin, engine);
        OMElement services = builder.buildOM();
        rootelementName = services.getLocalName();
        if(SERVICE_ELEMENT.equals(rootelementName)){
            ServiceDescription serviceDesc = engine.getCurrentFileItem().
                    getService(DescriptionBuilder.getShortFileName(
                            engine.getCurrentFileItem().getName()));
            if(serviceDesc == null){
                serviceDesc = new ServiceDescription(
                        new QName(DescriptionBuilder.getShortFileName(
                                engine.getCurrentFileItem().getName())));
                engine.getCurrentFileItem().addService(serviceDesc);
            }
            serviceDesc.setParent(serviceGroupDesc);
            serviceDesc.setClassLoader(engine.getCurrentFileItem().getClassLoader());
            ServiceBuilder serviceBuilder = new ServiceBuilder(engine,serviceDesc);
            serviceBuilder.populateService(services);
        } else if(SERVICE_GROUP_ELEMENT.equals(rootelementName)){
            ServiceGroupBuilder groupBuilder = new ServiceGroupBuilder(services,engine);
            groupBuilder.populateServiceGroup(serviceGroupDesc);
View Full Code Here

    private void chageParameters(HttpServletRequest req,
                                 HttpServletResponse res)
            throws IOException {
        if(req.getParameter("changePara")!=null){
            String serviceName = req.getParameter("service");
            ServiceDescription service =  configContext.getAxisConfiguration().
                    getService(serviceName);
            if(service !=null){
                ArrayList service_para = service.getParameters();
                for (int i = 0; i < service_para.size(); i++) {
                    Parameter parameter = (Parameter) service_para.get(i);
                    String para =  req.getParameter(serviceName + "_" + parameter.getName());
                    service.addParameter(new ParameterImpl(parameter.getName(),para));
                }
                HashMap operation = service.getOperations();
                Collection op_col = operation.values();
                for (Iterator iterator = op_col.iterator(); iterator.hasNext();) {
                    OperationDescription operationDescription =
                            (OperationDescription) iterator.next();
                    String op_name = operationDescription.getName().getLocalPart();
View Full Code Here

            sysContext = ListenerManager.configurationContext;
        }

        //we will assume a Service and operations
        QName assumedServiceName = new QName("AnonymousService");
        ServiceDescription axisService = new ServiceDescription(assumedServiceName);
        operationTemplate = new OperationDescription(new QName("TemplateOperation"));
//        ServiceGroupDescription serviceGroupDescription = new ServiceGroupDescription(sysContext.getAxisConfiguration());

        PhasesInfo info =((AxisConfigurationImpl)sysContext.getAxisConfiguration()).getPhasesinfo();
        //to set the operation flows
        if(info != null){
            info.setOperationPhases(operationTemplate);
        }
        axisService.addOperation(operationTemplate);
        sysContext.getAxisConfiguration().addService(axisService);
//        serviceGroupDescription.addService(axisService);
//        serviceGroupDescription.getServiceGroupContext(sysContext);
//        serviceGroupDescription.setServiceGroupName(assumedServiceName.getLocalPart());
//        sysContext.getAxisConfiguration().addServiceGroup(serviceGroupDescription);

//        return sysContext.createServiceContext(assumedServiceName);
        return     axisService.getParent().getServiceGroupContext(sysContext).getServiceContext(assumedServiceName.getLocalPart());
//        return serviceGroupDescription.getServiceGroupContext(sysContext).getServiceContext(
//                assumedServiceName.getLocalPart());
    }
View Full Code Here

    public void invokeBusinessLogic(
        MessageContext inMessage,
        MessageContext outMessage)
        throws AxisFault {
        try {
            ServiceDescription service =
                inMessage
                    .getOperationContext()
                    .getServiceContext()
                    .getServiceConfig();
            Parameter implInfoParam = service.getParameter("ServiceClass");
            if (implInfoParam == null) {
                throw new AxisFault(
                    Messages.getMessage("paramIsNotSpecified", "ServiceClass"));
            }
            InputStream groovyFileStream =
                service.getClassLoader().getResourceAsStream(
                    implInfoParam.getValue().toString());

            if (groovyFileStream == null) {
                throw new AxisFault(
                    Messages.getMessage("groovyUnableToLoad", implInfoParam.getValue().toString()));
View Full Code Here

            sysContext = ListenerManager.configurationContext;
        }

        //create new service
        QName assumedServiceName = new QName("AnonymousService");
        ServiceDescription axisService = new ServiceDescription(assumedServiceName);
        sysContext.getAxisConfiguration().addService(axisService);
        ServiceGroupContext serviceGroupContext = axisService.getParent().getServiceGroupContext(sysContext);

        return serviceGroupContext.getServiceContext(assumedServiceName.getLocalPart());
        //todo fixme Chinthaka
//        return sysContext.createServiceContext(
//                assumedServiceName);
View Full Code Here

        this.operationMEP = axisOperation.getAxisSpecifMEPConstant();
        this.operationContextMap = getServiceContext().getEngineContext()
                .getOperationContextMap();
       
        operationDescName = axisOperation.getName();
        ServiceDescription serviceDescription = axisOperation.getParent();
        if (serviceDescription!=null)
          serviceDescName = serviceDescription.getName();
    }
View Full Code Here

        super(null);
        this.axisOperation = axisOperation;
        this.operationMEP = axisOperation.getAxisSpecifMEPConstant();

        operationDescName = axisOperation.getName();
        ServiceDescription serviceDescription = axisOperation.getParent();
        if (serviceDescription!=null)
          serviceDescName = serviceDescription.getName();
    }
View Full Code Here

  protected void setUp() throws Exception {
    //Initializing descriptions
    axisConfiguration = new AxisConfigurationImpl ();
    serviceGroupDescription = new ServiceGroupDescription (axisConfiguration);
    serviceGroupDescription.setServiceGroupName(SERVICE_GROUP_NAME);
    serviceDescription = new ServiceDescription (serviceDescQName);
    operationDescription = new OperationDescription (operationDescName);
   
    //Creating links
    axisConfiguration.addServiceGroup(serviceGroupDescription);
    axisConfiguration.addService(serviceDescription);
View Full Code Here

        super(arg0);
    }

    public void testMEPfindingOnRelatesTO() throws Exception {

        ServiceDescription serviceConfig = new ServiceDescription(new QName("TempSC"));
        engineCtx.getAxisConfiguration().addService(serviceConfig);
       ServiceGroupContext sgc =  serviceConfig.getParent().getServiceGroupContext(engineCtx);

        ServiceContext sessionContext = sgc.getServiceContext("TempSC");
        MessageContext messageContext1 = this.getBasicMessageContext();

        messageContext1.setMessageID(
View Full Code Here

TOP

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

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.