You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by "Julio Francisco Veronelli (JIRA)" <xm...@ws.apache.org> on 2006/08/01 07:29:16 UTC

[jira] Commented: (XMLRPC-101) Possibility to subclass XmlRpcSunHttpTransport for added functionality

    [ http://issues.apache.org/jira/browse/XMLRPC-101?page=comments#action_12424741 ] 
            
Julio Francisco Veronelli commented on XMLRPC-101:
--------------------------------------------------

I'm tackling the SSL thingy first. Attached is a patch for setting a SSLSocketFactory that will be used in https connections.

XmlRpcSunHttpTransport has been modified, as well as it's factory.

XmlRpcLiteHttpTransport did not even allow https connections, but hopefully now they are allowed whether or not a SSLSocketFactory is given (factory also modified). (Also, perhaps sendRequest() should throw an Exception if url.getProtocol() does not return http or https?)

As for XmlRpcCommonsTransport, I could not easily find how to set a SSLSocketFactory, so I skipped that one.

Note that all changes require Java 1.4 or later (I don't know what if the minimum version is).

As a sidenote, if I'm right, the tutorial in http://ws.apache.org/xmlrpc/ssl.html works only in a XmlRpcSunHttpTransport. If true, maybe it should be warned within the tutorial.

Hope any of this helps.

> Possibility to subclass XmlRpcSunHttpTransport for added functionality
> ----------------------------------------------------------------------
>
>                 Key: XMLRPC-101
>                 URL: http://issues.apache.org/jira/browse/XMLRPC-101
>             Project: XML-RPC
>          Issue Type: Improvement
>          Components: Source
>    Affects Versions: 3.0rc1
>            Reporter: Julio Francisco Veronelli
>            Priority: Trivial
>
> Could it be possible to make the URLConnection in class org.apache.xmlrpc.client.XmlRpcSunHttpTransport protected instead of private? That is:
> protected URLConnection conn;
> REASON:
> That way is much easier to subclass for added functionality. In particular, i'm subclassing it to set a java.net.Proxy or a java.security.KeyStore used for setting a SSL connection.
> In XML-RPC 3.0a1 it was easy to do, all that was needed was to subclass method newConnection(). In 3.0RC1 that method is gone, and overwriting sendRequest(XmlRpcRequest) is not possible, since conn is private.
> I tried also extending XmlRpcHttpTransport, but it is not possible, because org.apache.xmlrpc.client.XmlRpcStreamTransport.RequestWriter is protected and cannot be accessed.
> Thanks in advance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org