本文整理汇总了Java中org.wso2.carbon.registry.reporting.stub.ReportingAdminServiceStub类的典型用法代码示例。如果您正苦于以下问题:Java ReportingAdminServiceStub类的具体用法?Java ReportingAdminServiceStub怎么用?Java ReportingAdminServiceStub使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReportingAdminServiceStub类属于org.wso2.carbon.registry.reporting.stub包,在下文中一共展示了ReportingAdminServiceStub类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ReportGeneratorClient
import org.wso2.carbon.registry.reporting.stub.ReportingAdminServiceStub; //导入依赖的package包/类
public ReportGeneratorClient(HttpServletRequest request, ServletConfig config) {
HttpSession session = request.getSession();
String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
ConfigurationContext configContext = (ConfigurationContext) config.
getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
String epr = backendServerURL + "ReportingAdminService";
try {
stub = new ReportingAdminServiceStub(configContext, epr);
ServiceClient client = stub._getServiceClient();
Options option = client.getOptions();
option.setManageSession(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, cookie);
} catch (AxisFault e) {
log.error("Failed to initiate report generator client.", e);
}
}
示例2: ReportAdminServiceClient
import org.wso2.carbon.registry.reporting.stub.ReportingAdminServiceStub; //导入依赖的package包/类
public ReportAdminServiceClient(String backendURL, String sessionCookie) throws AxisFault {
String endPoint = backendURL + serviceName;
try {
reportingAdminServiceStub = new ReportingAdminServiceStub(endPoint);
} catch (AxisFault axisFault) {
String err = "Stub initialization fail";
log.error("Stub initialization fail" + axisFault.getMessage());
throw new AxisFault(err, axisFault);
}
AuthenticateStub.authenticateStub(sessionCookie, reportingAdminServiceStub);
}