I've checked out the Edison-Branch from your SVN and added a method to SoapProvisioning.java:
Code:
public void soapSetTransport(HttpClient httpClient, String uri) {
if (mTransport != null) mTransport.shutdown();
mTransport = new SoapHttpTransport(httpClient, uri);
if (mAuthToken != null)
mTransport.setAuthToken(mAuthToken);
if (mDebugListener != null)
mTransport.setDebugListener(mDebugListener);
} and a constructor for SoapHttpTransport:
Code:
public SoapHttpTransport(HttpClient httpClient, String uri)
{
super();
mClient = httpClient;
commonInit(uri);
} Now i can instantiate a SoapProvisioning like this:
Code:
HttpClient httpClient = new HttpClient();
httpClient.getHostConfiguration().setProxy("proxy-host", 8080);
SoapProvisioning sp = new SoapProvisioning();
sp.soapSetTransport(httpClient, soapURI); I've also added a method in ZMailbox.Options:
Code:
public void setHttpClient(HttpClient httpClient)
{
mHttpClient=httpClient;
} and changed the initPreAuth- and setSoapURI-Methods:
Code:
public void initPreAuth(String uri, SoapTransport.DebugListener listener, HttpClient httpClient) {
mNameToTag = new HashMap<String, ZTag>();
mIdToItem = new HashMap<String, ZItem>();
setSoapURI(uri, httpClient);
if (listener != null) mTransport.setDebugListener(listener);
}
private void setSoapURI(String uri, HttpClient httpClient) {
if (mTransport != null) mTransport.shutdown();
if (httpClient != null) mTransport = new SoapHttpTransport(httpClient, uri);
else mTransport = new SoapHttpTransport(uri);
mTransport.setUserAgent("zclient", BuildInfo.VERSION);
mTransport.setMaxNoitfySeq(0);
if (mAuthToken != null)
mTransport.setAuthToken(mAuthToken);
} Now its working
