Package org.apache.axis2.jaxws.description

Examples of org.apache.axis2.jaxws.description.ServiceDescription


        }
    }

    public void testNullServiceClass() {
        try {
            ServiceDescription serviceDescription =
                    new ServiceDescriptionImpl(null, serviceQName, null);
            fail("Exception for invalid Service class not thrown.");
        }
        catch (WebServiceException e) {
            // Expected path
View Full Code Here


    }

    public void testValidServiceSubclass() {
        QName uniqueQName = new QName(namespaceURI, localPart + "_testValidServiceSubclass");
        ServiceDescription serviceDescription =
                new ServiceDescriptionImpl(null, uniqueQName, ServiceSubclass.class);
        assertNotNull("Service description not created with valid Service subclass",
                      serviceDescription);
    }
View Full Code Here

            log.debug("Cache Map = " + cache.toString());
            if (key != null)
                log.debug("Description Key = " + key.printKey());

        }
        ServiceDescription serviceDesc = null;
        synchronized(configContext) {
            serviceDesc = cache.get(key);
            if (log.isDebugEnabled()) {
                log.debug("Check to see if ServiceDescription is found in cache");
            }
            if (serviceDesc != null) {
                if (log.isDebugEnabled()) {
                    log.debug("ServiceDescription found in the cache");
                    log.debug(serviceDesc.toString());
                }
            }
            if (serviceDesc == null) {
                if (log.isDebugEnabled()) {
                    log.debug("ServiceDescription not found in the cache");
                    log.debug(" creating new ServiceDescriptionImpl");
                }

                ServiceDescriptionImpl serviceDescImpl = new ServiceDescriptionImpl(wsdlURL, serviceQName, serviceClass);
                serviceDescImpl.setAxisConfigContext(configContext);
               
                serviceDesc = serviceDescImpl;
                if (log.isDebugEnabled()) {
                    log.debug("ServiceDescription created with WSDL URL: " + wsdlURL + "; QName: " +
                        serviceQName + "; Class: " + serviceClass);
                    log.debug(serviceDesc.toString());
                }
                if (log.isDebugEnabled()) {
                    log.debug("Caching new ServiceDescription in the cache");
                }
                cache.put(key, serviceDesc);
View Full Code Here

     *      AxisService)
     * @deprecated
     */
    public static ServiceDescription createServiceDescriptionFromServiceImpl(
            Class serviceImplClass, AxisService axisService) {
        ServiceDescription serviceDesc = new ServiceDescriptionImpl(serviceImplClass, axisService);
        if (log.isDebugEnabled()) {
            log.debug("Deprecated method used!  ServiceDescription created with Class: " +
                    serviceImplClass + "; AxisService: " + axisService);
            log.debug(serviceDesc.toString());
        }
        return serviceDesc;
    }
View Full Code Here

        return serviceDesc;
    }

    /** @see org.apache.axis2.jaxws.description.DescriptionFactory#createServiceDescription(Class) */
    public static ServiceDescription createServiceDescription(Class serviceImplClass) {
        ServiceDescription serviceDesc = null;

        if (serviceImplClass != null) {
            JavaClassToDBCConverter converter = new JavaClassToDBCConverter(serviceImplClass);
            HashMap<String, DescriptionBuilderComposite> dbcMap = converter.produceDBC();
            List<ServiceDescription> serviceDescList = createServiceDescriptionFromDBCMap(dbcMap);
View Full Code Here

        for (Iterator<DescriptionBuilderComposite> nameIter = dbcMap.values()
                .iterator(); nameIter.hasNext();) {
            DescriptionBuilderComposite serviceImplComposite = nameIter.next();
            if (isImpl(serviceImplComposite)) {
                // process this impl class
                ServiceDescription serviceDescription = new ServiceDescriptionImpl(
                        dbcMap, serviceImplComposite);
                ServiceDescriptionValidator validator =
                        new ServiceDescriptionValidator(serviceDescription);
                if (validator.validate()) {
                    serviceDescriptionList.add(serviceDescription);
                    if (log.isDebugEnabled()) {
                        log.debug("Service Description created from DescriptionComposite: " +
                                serviceDescription);
                    }
                } else {

                    String msg =
                            "The ServiceDescription failed to validate due to the following errors: \n" +
                                    validator.toString();

                    if (log.isDebugEnabled()) {
                        log.debug("Validation Phase 2 failure: " + msg);
                        log.debug("Failing composite: " + serviceImplComposite.toString());
                        log.debug("Failing Service Description: " + serviceDescription.toString());
                    }

                    // TODO: Validate all service descriptions before failing
                    // TODO: Get more detailed failure information from the Validator
                    throw ExceptionFactory.makeWebServiceException(msg);
View Full Code Here

                                                        MessageContext messageContext) {
        if (messageContext == null) {
            throw ExceptionFactory.makeWebServiceException("Null MessageContext");
        }

        ServiceDescription sd = messageContext.getEndpointDescription().getServiceDescription();
        if (sd != null) {
            ConfigurationContext configCtx = sd.getAxisConfigContext();
            List<ApplicationContextMigrator> migratorList = (List<ApplicationContextMigrator>)configCtx.getProperty(contextMigratorListID);
            synchronized(migratorList){
                if (migratorList != null) {
                    ListIterator<ApplicationContextMigrator> itr = migratorList.listIterator();
                    while (itr.hasNext()) {
View Full Code Here

                                                          MessageContext messageContext) {
        if (messageContext == null) {
            throw ExceptionFactory.makeWebServiceException("Null MessageContext");
        }

        ServiceDescription sd = messageContext.getEndpointDescription().getServiceDescription();
        if (sd != null) {
            ConfigurationContext configCtx = sd.getAxisConfigContext();
            List<ApplicationContextMigrator> migratorList =
                    (List<ApplicationContextMigrator>)configCtx.getProperty(contextMigratorListID);

            synchronized(migratorList){
                if (migratorList != null) {
View Full Code Here

            throws LifecycleException, ResourceInjectionException {
        org.apache.axis2.context.MessageContext msgContext = mc.getAxisMessageContext();

        // Get the ServiceDescription and injectionDesc which contain
        // cached information
        ServiceDescription serviceDesc = mc.getEndpointDescription().getServiceDescription();
        ResourceInjectionServiceRuntimeDescription injectionDesc = null;
        if (serviceDesc != null) {
            injectionDesc =
                    ResourceInjectionServiceRuntimeDescriptionFactory
                            .get(serviceDesc, serviceImplClass);
View Full Code Here

    /**
     * @param ed
     * @return
     */
    static MarshalServiceRuntimeDescription getMarshalDesc(EndpointDescription ed) {
        ServiceDescription sd = ed.getServiceDescription();
        return MarshalServiceRuntimeDescriptionFactory.get(sd);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.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.