本文整理汇总了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)");
}
}
示例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);
}
}
}
}
示例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.");
}
}
}
示例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);
}
示例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);
}
示例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));
}