java调用sharepoint中的webservice 第2页

        m_ServiceClient = m_SPStub._getServiceClient();
        m_ServiceClient.engageModule("addressing");

        Options options = m_ServiceClient.getOptions();
        options.setTimeOutInMilliSeconds(2 * 60 * 1000);
        options.setUseSeparateListener(false);

        HttpTransportProperties.Authenticator basicauth = new HttpTransportProperties.Authenticator();

        basicauth.setUsername(username);
        basicauth.setPassword(pwd);
        basicauth.setHost(hostname);
        basicauth.setDomain(domaname);
        List authPrefs = new ArrayList(1);
        authPrefs.add(AuthPolicy.NTLM);
        basicauth.setAuthSchemes(authPrefs);
        options.setProperty(HTTPConstants.AUTHENTICATE, basicauth);
        m_ServiceClient.setOptions(options);
        m_Options=options;
        // _serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,Boolean.FALSE);
    }

上一页  [1] [2] 

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有