本文整理汇总了Java中org.apache.axis2.client.Stub._getServiceClient方法的典型用法代码示例。如果您正苦于以下问题:Java Stub._getServiceClient方法的具体用法?Java Stub._getServiceClient怎么用?Java Stub._getServiceClient使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.axis2.client.Stub
的用法示例。
在下文中一共展示了Stub._getServiceClient方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initStub
import org.apache.axis2.client.Stub; //导入方法依赖的package包/类
private void initStub(Stub stub) throws AxisFault
{
if( stub != null )
{
final ServiceClient client = stub._getServiceClient();
final Options options = client.getOptions();
options.setProperty(WSHandlerConstants.PW_CALLBACK_REF, this);
options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, ofc.getProperty());
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true");
options.setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION, HTTPConstants.HEADER_PROTOCOL_11);
URI uri = URI.create(bbUrl);
if( uri.getScheme().toLowerCase().startsWith("https") )
{
Protocol myhttps = new Protocol("https", new EasySSLProtocolSocketFactory(), 443);
options.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, myhttps);
}
client.engageModule("rampart-1.5.1");
}
}
示例2: authenticateStub
import org.apache.axis2.client.Stub; //导入方法依赖的package包/类
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) {
long soTimeout = 5 * 60 * 1000; // Three minutes
ServiceClient client = stub._getServiceClient();
Options option = client.getOptions();
option.setManageSession(true);
option.setTimeOutInMilliSeconds(soTimeout);
System.out.println("XXXXXXXXXXXXXXXXXXX" +
backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""));
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")));
if (log.isDebugEnabled()) {
log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
}
return stub;
}
示例3: authenticateStub
import org.apache.axis2.client.Stub; //导入方法依赖的package包/类
public static Stub authenticateStub(Stub stub, String sessionCookie, String backendURL) {
long soTimeout = 5 * 60 * 1000; // Three minutes
ServiceClient client = stub._getServiceClient();
Options option = client.getOptions();
option.setManageSession(true);
option.setTimeOutInMilliSeconds(soTimeout);
System.out.println("XXXXXXXXXXXXXXXXXXX" +
backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", ""));
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
option.setTo(new EndpointReference(backendURL + client.getServiceContext().getAxisService().getName().replaceAll("[^a-zA-Z]", "")));
if (log.isDebugEnabled()) {
log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
}
return stub;
}
示例4: authenticateStub
import org.apache.axis2.client.Stub; //导入方法依赖的package包/类
/**
* Stub authentication method
*
* @param stub valid stub
* @param sessionCookie session cookie
*/
public static void authenticateStub(String sessionCookie, Stub stub) {
long soTimeout = 5 * 60 * 1000; // Three minutes
ServiceClient client = stub._getServiceClient();
Options option = client.getOptions();
option.setManageSession(true);
option.setTimeOutInMilliSeconds(soTimeout);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING, sessionCookie);
if (log.isDebugEnabled()) {
log.debug("AuthenticateStub : Stub created with session " + sessionCookie);
}
}
示例5: setAuthCookie
import org.apache.axis2.client.Stub; //导入方法依赖的package包/类
private void setAuthCookie(boolean isExpired, Stub stub, Authenticator authenticator)
throws Exception {
ServiceClient client = stub._getServiceClient();
Options option = client.getOptions();
option.setManageSession(true);
option.setProperty(org.apache.axis2.transport.http.HTTPConstants.COOKIE_STRING,
authenticator.getCookie(isExpired));
}
示例6: configureServiceClient
import org.apache.axis2.client.Stub; //导入方法依赖的package包/类
private void configureServiceClient(Stub stub, HttpSession session) {
ServiceClient client;Options options;
client = stub._getServiceClient();
options = client.getOptions();
if (workListConfig.getUsername() != null
&& workListConfig.getPassword() != null && workListConfig.isRemote()) {
CarbonUtils.setBasicAccessSecurityHeaders(workListConfig.getUsername(),
workListConfig.getPassword(), client);
} else {
options.setProperty(HTTPConstants.COOKIE_STRING,
session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE));
}
options.setManageSession(true);
}