Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-101

Possibility to subclass XmlRpcSunHttpTransport for added functionality

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0rc1
    • Fix Version/s: None
    • Component/s: Source
    • Labels:
      None

      Description

      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.

        Attachments

        1. ssl.patch
          7 kB
          Julio Francisco Veronelli
        2. sunhttp.zip
          4 kB
          Julio Francisco Veronelli

          Activity

            People

            • Assignee:
              jochen@apache.org Jochen Wiedmann
              Reporter:
              ckjfveronelli Julio Francisco Veronelli
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: