Package org.apache.axis2.description

Examples of org.apache.axis2.description.ServiceDescription


    }


    public void testEchoXMLCompleteSync() throws Exception {
        ServiceDescription service =
            Utils.createSimpleService(
                serviceName,
        Echo.class.getName(),
                operationName);
View Full Code Here


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

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

        return method;
    }

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

        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
View Full Code Here

    public void setStorage(AxisStorage storage) {
        this.storage = storage;
    }

    public ServiceContext createServiceContext(QName serviceName) throws AxisFault {
        ServiceDescription service = axisConfiguration.getService(serviceName);
        if(service != null){
            ServiceContext serviceContext = new ServiceContext(service, this);
            return serviceContext;
        }else{
            throw new AxisFault("Service not found service name = "+serviceName );
View Full Code Here

        Utils.addHandler(flow, new SpeakingHandler(),PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow, new SpeakingHandler(),PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow, culprit,PhaseMetadata.PHASE_POLICY_DETERMINATION);
        Utils.addHandler(flow, new SpeakingHandler(),PhaseMetadata.PHASE_POLICY_DETERMINATION);
       
        ServiceDescription service = Utils.createSimpleService(serviceName,Echo.class.getName(),operationName);
        service.setInFlow(flow);
       
        UtilServer.start();
        UtilServer.deployService(service);
        try {
            callTheService();
View Full Code Here

                fac = OMAbstractFactory.getSOAP11Factory();
            }else {
                throw new AxisFault("Unknown SOAP Version. Current Axis handles only SOAP 1.1 and SOAP 1.2 messages");
            }

            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(), true, classLoader);
                return implClass.newInstance();
            } else {
View Full Code Here

      * @param msgContext
      * @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 = sessionContext.getProperty(serviceName.getLocalPart());
                if (obj == null) {
View Full Code Here

            sysContext = ListenerManager.configurationContext;
        }

        //create new service
        QName assumedServiceName = new QName("AnonnoymousService");
        ServiceDescription axisService = new ServiceDescription(assumedServiceName);
        operationTemplate = new OperationDescription(new QName("TemplateOperatin"));
        axisService.addOperation(operationTemplate);
        sysContext.getAxisConfiguration().addService(axisService);
        ServiceContext service = sysContext.createServiceContext(assumedServiceName);
        return service;
    }
View Full Code Here

    }

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

        ServiceDescription service = new ServiceDescription(serviceName);
        OperationDescription operation = new OperationDescription(operationName);
        operation.setMessageReciever(new MessageReceiver() {
            public void recieve(MessageContext messgeCtx) throws AxisFault {
                envelope = messgeCtx.getEnvelope();
                TestingUtils.campareWithCreatedOMElement(envelope.getBody().getFirstElement());
            }
        });
        service.addOperation(operation);
        UtilServer.deployService(service);
      }
View Full Code Here

    protected void setUp() throws Exception {
        UtilServer.start();
        UtilServer.getConfigurationContext().getAxisConfiguration().engageModule(
            new QName("addressing"));

        ServiceDescription service =
            Utils.createSimpleService(
                serviceName,
        Echo.class.getName(),
                operationName);
        UtilServer.deployService(service);
        serviceContext =
            UtilServer.getConfigurationContext().createServiceContext(service.getName());

    }
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.