Package org.apache.axis2.description

Examples of org.apache.axis2.description.ServiceDescription


                fac = OMAbstractFactory.getSOAP11Factory();
            } else {
                throw new AxisFault(Messages.getMessage("invalidSOAPversion"));
            }

            ServiceDescription service =
                msgContext
                    .getOperationContext()
                    .getServiceContext()
                    .getServiceConfig();
            ClassLoader classLoader = service.getClassLoader();
            Parameter implInfoParam = service.getParameter(SERVICE_CLASS);
            if (implInfoParam != null) {
                Class implClass =
                    Class.forName(
                        ((String) implInfoParam.getValue()).trim(),
                        true,
View Full Code Here


     * @return
     * @throws AxisFault
     */
    protected Object getTheImplementationObject(MessageContext msgContext)
        throws AxisFault {
        ServiceDescription service =
            msgContext
                .getOperationContext()
                .getServiceContext()
                .getServiceConfig();

        Parameter scopeParam = service.getParameter(SCOPE);
        QName serviceName = service.getName();
        if (scopeParam != null
            && Constants.SESSION_SCOPE.equals(scopeParam.getValue())) {
            SessionContext sessionContext = msgContext.getSessionContext();
            synchronized (sessionContext) {
                Object obj =
View Full Code Here

        cl = Thread.currentThread().getContextClassLoader();
    }

    protected void setUp() throws Exception {
        UtilServer.start();
        ServiceDescription service = Utils.createSimpleService(serviceName,
                Echo.class.getName(),
                operationName);


        service.setInFlow(new MockFlow("service inflow", 4));
        service.setOutFlow(new MockFlow("service outflow", 5));
        //service.setFaultInFlow(new MockFlow("service faultflow", 1));

        ModuleDescription m1 = new ModuleDescription(
                new QName("", "A Mdoule 1"));
        m1.setInFlow(new MockFlow("service module inflow", 4));
        //m1.setFaultInFlow(new MockFlow("service module faultflow", 1));
        engineRegistry = new AxisConfigurationImpl();
        service.engageModule(m1,engineRegistry);

        OperationDescription operation = new OperationDescription(
                operationName);
        service.addOperation(operation);

        UtilServer.deployService(service);
        UtilServer.start();
    }
View Full Code Here

    }

    protected void setUp() throws Exception {
        UtilServer.start();

        ServiceDescription service =
                Utils.createSimpleService(serviceName,
                        Echo.class.getName(),
                        operationName);
        UtilServer.deployService(service);
View Full Code Here

    protected void setUp() throws Exception {
        ConfigurationContext configContext = UtilsMailServer.start();
       
//        configContext.getAxisConfiguration().engageModule(
//                new QName(Constants.MODULE_ADDRESSING));
        ServiceDescription service =
                Utils.createSimpleService(serviceName,
                        Echo.class.getName(),
                        operationName);
        configContext.getAxisConfiguration().addService(service);
        Utils.resolvePhases(configContext.getAxisConfiguration(), service);
View Full Code Here

    public void testEchoXMLCompleteASync() throws Exception {

        ConfigurationContext configContext = UtilsMailServer.createClientConfigurationContext();
       
        ServiceDescription service = new ServiceDescription(serviceName);
        OperationDescription operation = new OperationDescription(
                operationName);
        operation.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messgeCtx) throws AxisFault {
                envelope = messgeCtx.getEnvelope();
            }
        });
        service.addOperation(operation);
        configContext.getAxisConfiguration().addService(service);
        Utils.resolvePhases(configContext.getAxisConfiguration(), service);


View Full Code Here

    }

    protected void setUp() throws Exception {
        configContext = UtilsMailServer.start();

        ServiceDescription service = Utils.createSimpleService(serviceName,
                Echo.class.getName(), operationName);
        configContext.getAxisConfiguration().addService(service);
        Utils.resolvePhases(configContext.getAxisConfiguration(), service);

        SimpleMailListener ml = new SimpleMailListener();
View Full Code Here

            if (clientConfigContext ==null) {
                clientConfigContext = UtilsMailServer
                        .createClientConfigurationContext();
                engineRegistry = clientConfigContext.getAxisConfiguration();
            }
            ServiceDescription clientService = new ServiceDescription(
                    serviceName);
            OperationDescription clientOperation = new OperationDescription(
                    operationName);
            clientOperation.setMessageReceiver(new MessageReceiver() {
                public void receive(MessageContext messgeCtx) throws AxisFault {
                    envelope = messgeCtx.getEnvelope();
                }
            });
            engineRegistry.removeService(serviceName.getLocalPart());
            clientService.addOperation(clientOperation);
            engineRegistry.addService(clientService);
            Utils.resolvePhases(engineRegistry, clientService);
            clientServiceContext = Utils.fillContextInformation(clientOperation,  clientService, clientConfigContext);

            org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(
View Full Code Here

        ml.init(configContext,
                configContext.getAxisConfiguration().getTransportIn(
                        new QName(Constants.TRANSPORT_MAIL)));
        ml.start();

        ServiceDescription service = new ServiceDescription(serviceName);
        OperationDescription operation = new OperationDescription(
                operationName);
        operation.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messgeCtx) throws AxisFault {
                envelope = messgeCtx.getEnvelope();
            }
        });
        service.addOperation(operation);
        configContext.getAxisConfiguration().addService(service);
        Utils.resolvePhases(configContext.getAxisConfiguration(), service);
        ServiceContext serviceContext = Utils.fillContextInformation(operation,  service, configContext);
    }
View Full Code Here

        return method;
    }

    public void testOneWay() throws Exception {
        ServiceDescription service = new ServiceDescription(serviceName);
        OperationDescription operation = new OperationDescription(
                operationName);
        operation.setMessageReceiver(new MessageReceiver() {
            public void receive(MessageContext messgeCtx) throws AxisFault {
                envelope = messgeCtx.getEnvelope();
            }
        });
        service.addOperation(operation);
        configContext.getAxisConfiguration().addService(service);
        Utils.resolvePhases(configContext.getAxisConfiguration(), service);
        ServiceContext serviceContext = Utils.fillContextInformation(operation,  service, configContext);

        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
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.