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

XmlRpcClient executeAsync() causes failures for subsequent execute()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 3.0
    • None
    • Releases
    • None
    • Mac OS X 10.4 on the Client

    Description

      I'm currently using Apache WS XML-RPC 3.0 and I think I might have stumbled across a bug regarding using executeAsync() and execute() in the same client. Basically, I have an XMLRPC client which I would like to use synchronous calls and some with asynchronous, however, as soon as I start using executeAsync(), all the subsequent execute() will start to fail.

      The XML-RPC server is a Python SimpleXMLRPCServer. I've also tested it with the twisted.web XMLRPC implementation as well. I did some further investigating and found that the executeAsync call was sending a "Content-Length: 0" with no corresponding XMLRPC request to the server, causing an HTTP 500 response from the server.

      From ngrep, the HTTP headers look something like this:

      T 192.168.9.3:50335 -> XX.XXX.XXX.XX:8999 [AP]
      POST / HTTP/1.1..Content-Type: text/xml..User-Agent: Apache XML RPC 3.0 (Su
      n HTTP Transport)..Content-Length: 0..Cache-Control: no-cache..Pragma: no-c
      ache..Host: XX.XXX.XXX.XX:8999..Accept: text/html, image/gif, i
      mage/jpeg, ; q=.2, */; q=.2..Connection: keep-alive....
      ##
      T XX.XXX.XXX.XX:8999 -> 192.168.9.3:50335 [AP]
      HTTP/1.0 500 Internal error..
      ##

      Attached is an example client that produces an error. Change the execute call to a function on an echo XMLRPC server.

      It would be great to know if it is my fault, or something funny going on with the threading inside XMLRPC.

      Attachments

        1. XmlRpcAsync.java
          2 kB
          Alastair Tse
        2. XmlRpcAsync.java
          3 kB
          Jochen Wiedmann

        Activity

          People

            Unassigned Unassigned
            alastairtse Alastair Tse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: