本文整理汇总了Java中org.wso2.carbon.registry.info.stub.InfoAdminServiceStub类的典型用法代码示例。如果您正苦于以下问题:Java InfoAdminServiceStub类的具体用法?Java InfoAdminServiceStub怎么用?Java InfoAdminServiceStub使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InfoAdminServiceStub类属于org.wso2.carbon.registry.info.stub包,在下文中一共展示了InfoAdminServiceStub类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: InfoServiceAdminClient
import org.wso2.carbon.registry.info.stub.InfoAdminServiceStub; //导入依赖的package包/类
public InfoServiceAdminClient(String backEndUrl, String sessionCookie)
throws RegistryException, AxisFault {
String serviceName = "InfoAdminService";
String endPoint = backEndUrl + serviceName;
try {
infoAdminServiceStub = new InfoAdminServiceStub(endPoint);
AuthenticateStub.authenticateStub(sessionCookie, infoAdminServiceStub);
} catch (AxisFault axisFault) {
log.error("infoAdminServiceStub Initialization fail " + axisFault.getMessage());
throw new AxisFault("infoAdminServiceStub Initialization fail " + axisFault.getMessage());
}
}
示例2: InfoServiceClient
import org.wso2.carbon.registry.info.stub.InfoAdminServiceStub; //导入依赖的package包/类
public InfoServiceClient(String cookie, ServletConfig config, HttpSession session)
throws RegistryException {
this.session =session;
if (proxy == null) {
String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(),
session);
ConfigurationContext configContext = (ConfigurationContext) config.
getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
String epr = backendServerURL + "InfoAdminService";
try {
stub = new InfoAdminServiceStub(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 axisFault) {
String msg = "Failed to initiate comment service client. " + axisFault.getMessage();
log.error(msg, axisFault);
throw new RegistryException(msg, axisFault);
}
proxy = this;
}
}