Coder Social home page Coder Social logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Hello,

We had the same problem communicating with Magento (written in PHP -
http://www.magentocommerce.com/).
<value><nil/></value> seem to be a common practice...

As said above, the thing is that in the method ParseValue method (file
XmlRpcSerializer:869) there is no "else if(node.Name == "nil")" and in this 
case, the
method returns null. Which is fine in our case.

But later, the code wants to get the type of the value and so throws a
NullReferenceException.
We resolved the problem by adding a test before getting value:
File XmlRpcStruct.cs:39, replace
      if (XmlRpcServiceInfo.GetXmlRpcType(value.GetType()) 
by
      if (value != null && XmlRpcServiceInfo.GetXmlRpcType(value.GetType()) 

Even if the "<nil/>" is not standard and not supposed to be supported, to my 
sense,
the fact that there is no final "else" case and then later throw a
NullReferenceException when the situation is reached is a bug.
The lib should explicitely exclude the unsupported cases by adding something 
like
      else{ throw new NotSupportedException("some message"); }
or at least make an Assert.

Original comment by [email protected] on 16 Dec 2008 at 2:48

from xmlrpcnet.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024

Original comment by [email protected] on 19 Dec 2008 at 1:58

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from xmlrpcnet.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
I also need this to be completed. The Wikidot.com API uses <nil/> for some of 
it's responses.

I will try modifying my copy of the library based on the suggestions above, but 
I'd certainly appreciate it being part of the official release.

Thanks,
Shane

Original comment by [email protected] on 16 Oct 2010 at 8:53

from xmlrpcnet.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
<nil/> values supported in release 3.0

Original comment by [email protected] on 6 Mar 2011 at 10:08

  • Changed state: Verified
  • Added labels: Release-3-0

from xmlrpcnet.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 29, 2024
Thanks!

Original comment by [email protected] on 6 Mar 2011 at 10:27

from xmlrpcnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.