removed dependency on xml-rpc
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Wed, 25 Jan 2012 08:05:25 +0000 (12:05 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Thu, 26 Jan 2012 13:50:11 +0000 (17:50 +0400)
plugins/tasks/jira-connector/jira-connector.iml
plugins/tasks/jira-connector/src/main/java/com/intellij/tasks/jira/HttpClientTransport.java [deleted file]

index e47df2880a1f20ab4ecbee008c67273c018b5c6d..8be54150f15df0c3324db9bc3d08e64474a061c2 100644 (file)
@@ -12,7 +12,6 @@
     <orderEntry type="module" module-name="util" />
     <orderEntry type="module" module-name="platform-api" />
     <orderEntry type="library" scope="TEST" name="JUnit4" level="project" />
-    <orderEntry type="library" name="XmlRPC" level="project" />
     <orderEntry type="module" module-name="tasks-api" />
     <orderEntry type="library" name="http-client-3.1" level="project" />
   </component>
diff --git a/plugins/tasks/jira-connector/src/main/java/com/intellij/tasks/jira/HttpClientTransport.java b/plugins/tasks/jira-connector/src/main/java/com/intellij/tasks/jira/HttpClientTransport.java
deleted file mode 100644 (file)
index 669fd13..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-package com.intellij.tasks.jira;
-
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.xmlrpc.XmlRpc;
-import org.apache.xmlrpc.XmlRpcClientException;
-import org.apache.xmlrpc.XmlRpcTransport;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-public class HttpClientTransport implements XmlRpcTransport {
-
-  private final String myUrl;
-  private final HttpClient myHttpClient;
-  private final Header myUserAgentHeader = new Header("User-Agent", XmlRpc.version);
-  private PostMethod myMethod;
-
-  public HttpClientTransport(String url, HttpClient httpClient) {
-    myUrl = url;
-    myHttpClient = httpClient;
-  }
-
-  public InputStream sendXmlRpc(byte[] request) throws IOException, XmlRpcClientException {
-    myMethod = new PostMethod(myUrl);
-    myMethod.setRequestHeader(new Header("Content-Type", "text/xml"));
-    myMethod.setRequestHeader(myUserAgentHeader);
-    myMethod.setRequestEntity(new ByteArrayRequestEntity(request));
-
-    configureMethod(myMethod);
-
-    myHttpClient.executeMethod(myMethod);
-    return myMethod.getResponseBodyAsStream();
-  }
-
-  protected void configureMethod(HttpMethod method) {  
-  }
-
-  public void endClientRequest() throws XmlRpcClientException {
-    myMethod.releaseConnection();
-  }
-}