当前位置: 首页>>代码示例>>Java>>正文


Java ServiceContext.getAxisService方法代码示例

本文整理汇总了Java中org.apache.axis2.context.ServiceContext.getAxisService方法的典型用法代码示例。如果您正苦于以下问题:Java ServiceContext.getAxisService方法的具体用法?Java ServiceContext.getAxisService怎么用?Java ServiceContext.getAxisService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.context.ServiceContext的用法示例。


在下文中一共展示了ServiceContext.getAxisService方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import org.apache.axis2.context.ServiceContext; //导入方法依赖的package包/类
/**
 * Create and add a listener
 * @param sc ServiceContext
 */
public static void create(ServiceContext sc) {
    if(log.isDebugEnabled()){
        log.debug("Start ProviderOMContextListener.create(ServiceContext)");
    }
    if (sc == null || 
        sc.getAxisService() == null ||
        sc.getAxisService().
        hasMessageContextListener(ProviderOMContextListener.class)){
        if(log.isDebugEnabled()){
            log.debug("ProviderOMContextListener already installed on AxisService");
        }
        return;
    }
    ProviderOMContextListener listener = new ProviderOMContextListener();
    sc.getAxisService().addMessageContextListener(listener);
    if(log.isDebugEnabled()){
        log.debug("End ProviderOMContextListener.create(ServiceContext)");
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:24,代码来源:ProviderOMContextListener.java

示例2: initService

import org.apache.axis2.context.ServiceContext; //导入方法依赖的package包/类
/**
 * To init all the services in application scope
 *
 * @param serviceGroupContext the ServiceGroupContext from which to extract all the services
 * @throws AxisFault if there's a problem initializing
 */
public static void initService(ServiceGroupContext serviceGroupContext) throws AxisFault {
    AxisServiceGroup serviceGroup = serviceGroupContext.getDescription();
    Iterator<AxisService> serviceItr = serviceGroup.getServices();
    while (serviceItr.hasNext()) {
        AxisService axisService = (AxisService) serviceItr.next();
        ServiceContext serviceContext = serviceGroupContext.getServiceContext(axisService);
        AxisService service = serviceContext.getAxisService();
        ClassLoader classLoader = service.getClassLoader();
        Parameter implInfoParam = service.getParameter(Constants.SERVICE_CLASS);
        if (implInfoParam != null) {
            try {
            	ThreadContextDescriptor tc = setThreadContext(axisService);
                Class implClass = Loader.loadClass(
                        classLoader,
                        ((String) implInfoParam.getValue()).trim());
                Object serviceImpl = makeNewServiceObject(service);
                serviceContext.setProperty(ServiceContext.SERVICE_OBJECT, serviceImpl);
                initServiceObject(serviceImpl, serviceContext);
                restoreThreadContext(tc);
            } catch (Exception e) {
                throw AxisFault.makeFault(e);
            }
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:32,代码来源:DependencyManager.java

示例3: init

import org.apache.axis2.context.ServiceContext; //导入方法依赖的package包/类
public void init(ServiceContext serviceContext) throws AxisFault {
    if (!initialized) {
        // first initialize the logger
        log = Logger.getLogger(KomaduServiceSkeleton.class);

        if (log.isDebugEnabled())
            log.debug("in init");

        // try load the komadu properties file through a service parameter
        AxisService axisService = serviceContext.getAxisService();
        String propertiesPath = (String) axisService
                .getParameterValue("komadu.properties.file.path");

        if (propertiesPath != null) {
            // remove potential whitespace introduced in komadu.properties
            propertiesPath = propertiesPath.trim();
            ServiceLauncher.start(propertiesPath);

            ingester = ServiceLauncher.getIngester();
            querier = ServiceLauncher.getQuerier();

            try {
                ingester.resetUnfinishedNotifications();
            } catch (IngestException e) {
                log.error("Error resetting unfinished notifications", e);
            }
            initialized = Boolean.TRUE;
        } else {
            log.error("Couldn't initialize Komadu Service, Komadu properties file not found.");
        }
    }
}
 
开发者ID:Data-to-Insight-Center,项目名称:komadu,代码行数:33,代码来源:KomaduServiceSkeleton.java

示例4: create

import org.apache.axis2.context.ServiceContext; //导入方法依赖的package包/类
/**
 * Create and add a listener
 * @param sc ServiceContext
 */
public static void create(ServiceContext sc) {
    
    // Only create and add one listener 
    if (sc == null || 
        sc.getAxisService() == null ||
        sc.getAxisService().
           hasMessageContextListener(UnmarshalMessageContextListener.class)) {
        return;
    }
    UnmarshalMessageContextListener listener = new UnmarshalMessageContextListener();
    sc.getAxisService().addMessageContextListener(listener);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:UnmarshalMessageContextListener.java

示例5: init

import org.apache.axis2.context.ServiceContext; //导入方法依赖的package包/类
/**
 * Session related methods
 */
public void init(ServiceContext serviceContext) {
    AxisService service = serviceContext.getAxisService();
    this.availableBookList = (BookList) service.getParameterValue(LibraryConstants.AVAILABLE_BOOK);
    this.availableBookList.setListName(LibraryConstants.AVAILABLE_BOOK);
    this.allBookList = (BookList) service.getParameterValue(LibraryConstants.ALL_BOOK);
    this.lendBookList = (BookList) service.getParameterValue(LibraryConstants.LEND_BOOK);
    this.userList = (UserList) service.getParameterValue(LibraryConstants.USER_LIST);
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:LibraryService.java

示例6: destroy

import org.apache.axis2.context.ServiceContext; //导入方法依赖的package包/类
public void destroy(ServiceContext serviceContext) throws AxisFault {
    AxisService service = serviceContext.getAxisService();
    service.addParameter(new Parameter(LibraryConstants.AVAILABLE_BOOK, availableBookList));
    service.addParameter(new Parameter(LibraryConstants.ALL_BOOK, allBookList));
    service.addParameter(new Parameter(LibraryConstants.LEND_BOOK, lendBookList));
    service.addParameter(new Parameter(LibraryConstants.USER_LIST, userList));
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:LibraryService.java


注:本文中的org.apache.axis2.context.ServiceContext.getAxisService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。