npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xmlrpc-message-umd

v2.0.1

Published

UNMAINTAINED XMLRPC message builder written with UMD definition

Downloads

54

Readme

xmlrpc-message-umd

UNMAINTAINED | This project is not maintained anymore (as of 2016 November 14).

NPM version Dependency Status Build Status

About

xmlrpc-message-umd is an XMLRPC message builder, written in Javascript.

This module only provides a string builder; it does not make any HTTP request by itself. Basically, it is just a small set of utils that create a valid "ready-to-be-sent" XMLRPC string, also meaning it works with any HTTP request module.

Installation for production

with Node.js

xmlrpc-message-umd is available on NPM

You can install it with the following command:

npm install xmlrpc-message-umd

Browser globals and AMD

xmlrpc-message-umd is available on Bower

To install it from Bower, just run

bower install xmlrpc-message-umd

Installation for development

You also can download the whole project (and build it from its source; see below).

Either use git clone command to get it:

git clone https://github.com/t1st3/xmlrpc-message-umd.git

Or download the latest version of the whole project.

Then, get the dependencies of the project from both Bower and NPM:

npm install
bower install

Usage

To create an XML-RPC message, just add parameters to a new instance of the lib, like the following:


var a = ["chicken","duck","goose"];
var obj = new Object();
obj.x = 20;
obj.y = "cow";
obj.z = 3.14;
var date = new Date();
var msg = new XMLRPCMessage();
msg.setMethod("system.myMethod");
msg.addParameter("mississippi");
msg.addParameter(7);
msg.addParameter(false);
msg.addParameter(a);
msg.addParameter(obj);
msg.addParameter(date);
msg.xml();

msg.xml() would then return the complete XML string.

By default, the type of the parameters is automatically detected. You can prevent this behavior and force the type of a parameter, for example:


var msg = new XMLRPCMessage();
msg.setMethod("system.myMethod");
msg.addParameter("qwerty", "base64");

As described on Apache Sofftware Foundation's XMLRPC documentation, the following types are available for XMLRPC:

  • i4 or int
  • boolean
  • string
  • double
  • dateTime.iso8601
  • base64
  • struct
  • array

Finally, you can also force types of elements within a struct element or an array element:


var obj = new Object();
obj.x = 20;
obj.y = {data: "cow", type: "base64"};
var msg = new XMLRPCMessage();
msg.setMethod("system.myMethod");
msg.addParameter(obj);

Build from source

First, see "Installation for development" above. Do not forget to get the dependencies!

Then, you also need to install Gulp globally to build the project.

npm install -g gulp

See more at the "Getting started with Gulp" page.

Once you got the dependencies and installed Gulp globally, to get info about the package from the command line, just run:

gulp info

You are now ready to build!

The source is located in the "src" folder; the built target is located in the "dist" folder.

To build, just run:

gulp build

Tests

To test, you can use either the npm test command or the gulp test command:

npm test

or

gulp test

Serve and livereload

You can also use the serve task to load the html pages from ./test/ in your browser.

gulp serve

Once it has loaded the page in the browser, this task watches for any modification in the source. If changes happen in the source, the task automatically reloads the page in the browser (livereload).

License

This piece of code is triple-licensed: MIT / BSD / GPL licenses

Initial author

t1st3