/** * Creates a new transport factory for the given client. */ public static XmlRpcTransportFactory newTransportFactory(XmlRpcClient pClient) { return new XmlRpcAhcTransportFactory(pClient); }
public XmlRpcAhcTransport( XmlRpcAhcTransportFactory xmlRpcAhcTransportFactory ) { super( xmlRpcAhcTransportFactory.getClient(), userAgent ); headers = new FluentCaseInsensitiveStringsMap(); }
public Confluence(String endpoint) throws MalformedURLException { if (endpoint.endsWith("/")) { endpoint = endpoint.substring(0, endpoint.length() - 1); } if (!endpoint.endsWith("/rpc/xmlrpc")) { endpoint += "/rpc/xmlrpc"; } XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl(); clientConfig.setServerURL(new URL(endpoint)); clientConfig.setEnabledForExtensions(true); client = new XmlRpcClient(); client.setTransportFactory( new XmlRpcAhcTransportFactory(client) ); client.setConfig(clientConfig); }
public Jira(String endpoint) throws MalformedURLException { if (endpoint.endsWith("/")) { endpoint = endpoint.substring(0, endpoint.length() - 1); } if (!endpoint.endsWith("/rpc/xmlrpc")) { endpoint += "/rpc/xmlrpc"; } XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl(); clientConfig.setServerURL(new URL(endpoint)); client = new XmlRpcClient(); client.setTransportFactory( new XmlRpcAhcTransportFactory(client) ); client.setConfig(clientConfig); BasicIssueFiller basicIssueFiller = new BasicIssueFiller(this); basicIssueFiller.setEnabled(true); issueFillers.put("issue", basicIssueFiller); issueFillers.put("project", new ProjectFiller(this)); autofillProviders.put("issue", BasicIssueFiller.class.getName()); autofillProviders.put("project", ProjectFiller.class.getName()); autofillProviders.put("voters", "org.codehaus.swizzle.jira.VotersFiller"); autofillProviders.put("subtasks", "org.codehaus.swizzle.jira.SubTasksFiller"); autofillProviders.put("attachments", "org.codehaus.swizzle.jira.AttachmentsFiller"); autofillProviders.put("comments", "org.codehaus.swizzle.jira.CommentsFiller"); }
private XmlRpcClient client() { if ( this.client == null ) { XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl(); clientConfig.setServerURL( url ); client = new XmlRpcClient(); client.setTransportFactory( new XmlRpcAhcTransportFactory( client ) ); client.setConfig( clientConfig ); } return client; }