XML-RPC
  1. XML-RPC
  2. XMLRPC-113

faultCode and faultString not working when throwing XmlRpcException on server

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.1
    • Component/s: Releases
    • Labels:
      None
    • Environment:
      Tomcat

      Description

      I am trying to create fault message with specific faultCode and faultString, but so far I have had little success.

      I am using XML-RPC libs from file xmlrpc-3.0-bin.tar.gz

      The method I am using on server is this:

      public Map method(Map request) throws XmlRpcException

      { throw new XmlRpcException(301, "My error message"); }

      This should generate fault message with faultCode=301 and faultString="My error message".

      However, this XML is what server sends over network. Notice that faultCode is 0 and not 301, and faultString has additional text appended before "My error message".

      <?xml version="1.0" encoding="UTF-8"?>
      <methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions">
      <fault>
      <value>
      <struct>
      <member>
      <name>faultString</name>
      <value>Failed to invoke method method in class MyXmlRpcClass: My error message</value>
      </member>
      <member>
      <name>faultCode</name>
      <value><i4>0</i4></value>
      </member>
      </struct>
      </value>
      </fault>
      </methodResponse>

        Activity

        Juha Syrjälä created issue -
        Jochen Wiedmann made changes -
        Field Original Value New Value
        Fix Version/s 3.1 [ 12312048 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jochen Wiedmann made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12383775 ] Default workflow, editable Closed status [ 12565412 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12565412 ] jira [ 12599145 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Juha Syrjälä
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development