magosoft / xmlrpcnet

Automatically exported from code.google.com/p/xmlrpcnet
0 stars 0 forks source link

Serialization error receiving faultCode with a string value. #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Please see details below.  We are invoking a new XmlRpcMethod class.
I have examined the source code in XmlRpcSerializer.cs and the problem occurs 
at lines 1813 on.  It would appear the code is expecting an xml node like this: 
<string>25</string> instead of what we are getting in our response.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
xml-rpc.net.2.5.0
Windows XP SP3

Please provide any additional information below.

Issue - We have a server that is returning the following response given 
below.  XMLRPC is crashing when it tries to convert the value 
"AMFPHP_RUNTIME_ERROR" to an integer.  It crashes regardless of whether 
NonStandard has been set to XmlRpcNonStandard.AllowStringFaultCode or not.
<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<fault>
 <value>
  <struct>
   <member>
    <name>faultCode</name>
    <value>
     <string>AMFPHP_RUNTIME_ERROR</string>
    </value>
   </member>
   <member>
    <name>faultDetail</name>
    <value>
     
<string>C:\\webserver\\websites\\PTV8\\phototellerPHP\\include\\check.php on 
line 62</string>
    </value>
   </member>
   <member>
    <name>faultString</name>
    <value>
     <string>Not correct value for user_group_id=NULL</string>
    </value>
   </member>
  </struct>
 </value>
</fault>
</methodResponse>

Original issue reported on code.google.com by pe...@whitechsolutions.com on 10 Sep 2010 at 5:51

GoogleCodeExporter commented 9 years ago

Original comment by ChasC...@gmail.com on 23 Sep 2010 at 7:34

GoogleCodeExporter commented 9 years ago
According to XML-RPC spec: The <methodResponse> could also contain a <fault> 
which contains a <value> which is a <struct> containing two elements, one named 
<faultCode>, an <int> and one named <faultString>, a <string>.

AllowStringFaultCode expects an integer in string format.

Original comment by ChasC...@gmail.com on 13 Oct 2010 at 6:05