Comments (9)
Wrote some code to allow type-less value-elements in #37
from node-xmlrpc.
Thanks @hugobuddel for the pull requests and especially the test cases. I should have time this weekend to look it over in more detail and merge it in.
Just curious, was there a program or other language's XML-RPC server sending you the XML without the String type?
from node-xmlrpc.
Your elaborate test suite proved quite valuable. For example, the <fault><value/></fault>
-test initially failed when I changed the code. This might have gone unnoticed without the test.
(Related, I noticed that I hadn't reset the charStream properly. As a result, some tests failed because another test left whitespace in charStream. Perhaps there would be a generic way to prevent a parsing from affecting subsequent parsings?)
There might be better ways to support default string-values though. For example, it might be cleaner to have separate deserializeValue
and deserializeParam
functions somehow. I'll leave it up to you how to procede.
I was implementing a SAMP 1.3 client (a protocol used in astronomy), using TOPCAT as a server. I do not know how TOPCAT (java, open source) constructs the XML. I'll create more test cases if necessary.
OT: Ultimately my goal is to create a browser-app, not a node-app. However, I thought that it might be easier to develop against node.js and port it later. Would node-xmlrpc (that is, the client part) be portable to a browser?
from node-xmlrpc.
To answer my own question: yes, it is portable to a browser. I created a branch that uses the ahr2
module instead of the http
module. This works excellent with the pakmanager
module to create a browser based XML-RPC client.
from node-xmlrpc.
Wow @hugobuddel, that's an impressive branch.
I originally wanted the XML-RPC module to work on node and the browser, but I found it easier (and cleaner code) to just target node.
I don't think the browser code should be ported to the main repo right now. I'm still iffy on Ender/Pakmanager vs AMD/Require.js and unsure about using a replacement module (ahr2) for such a core module in node (HTTP and HTTPS).
That said, I can link to your fork in the README for a browser compatible version.
Also, it may be worth creating a repo and npm package for turl.js as I could see that being useful for others.
from node-xmlrpc.
It turned out to be much easier than I expected. I agree that the branch should not be merged into the main repo. At least that was not my intent. Perhaps it would be possible to use ahr2
as a fallback when http(s)
is not available.
I though about creating a separate module out of my fork by renaming it. E.g. xmlrpcclient or something. That way it is easier to use as a dependency in other modules.
However, I'm just trying to get some work done that requires an XML-RPC client. I didn't plan to actively maintain a complete module :-). For example, I've only tested it in firefox, not even IE yet.
About turl.js: There must be modules that do this already. I didn't check though. It might even be that ahr2 has something like this already.
from node-xmlrpc.
@hugobuddel - I just wanted to let you know I have not forgotten about this value defaulting to string issue and will try to work on it soon.
from node-xmlrpc.
The defaulting value as String code has been merged. Thanks again.
from node-xmlrpc.
Super!
from node-xmlrpc.
Related Issues (20)
- Emoji in string raises error HOT 2
- CDATA on using '&'
- Why: Response has more than one param
- Uncaught TypeError: stream.setEncoding is not a function HOT 2
- Specifying number as long int when calling method HOT 1
- Knowing ip address of client HOT 5
- Add query to path on client side. HOT 1
- createClient returned object without methodCall
- trying XML RPC client with an https request HOT 2
- Error: ECONNRESET
- Is this project still maintained? HOT 3
- No way to set error handler on http/https server before listen is called
- Add info on request headers to readme
- How to tunnel through a proxy
- XMLRPC not resolve https/https HOT 4
- Bug in offset when parsing iso8601 date/time
- xmlrpc request with digest authentication in nodejs
- date formatter:decodeIso8601
- How do I enable CORS HOT 1
- this library still under maintenance? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-xmlrpc.