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


Java Stub._getServiceClient方法代码示例

本文整理汇总了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");
	}
}
 
开发者ID:equella,项目名称:Equella,代码行数:21,代码来源:BlackboardConnectorServiceImpl.java

示例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;
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:18,代码来源:AuthenticateStub.java

示例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;
}
 
开发者ID:DistX,项目名称:Learning,代码行数:18,代码来源:AuthenticateStub.java

示例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);
    }
}
 
开发者ID:wso2,项目名称:product-ei,代码行数:19,代码来源:AuthenticateStubUtil.java

示例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));
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:9,代码来源:SOAPEntitlementServiceClient.java

示例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);
}
 
开发者ID:wso2,项目名称:carbon-governance,代码行数:15,代码来源:HumanTaskClient.java


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