PHPackages                             comodojo/xmlrpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. comodojo/xmlrpc

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

comodojo/xmlrpc
===============

Yet another php xmlrpc decoder/encoder

2.0.1(5y ago)2121.0k↓50%75MITPHPPHP &gt;=7.4

Since Jan 3Pushed 4y ago3 watchersCompare

[ Source](https://github.com/comodojo/xmlrpc)[ Packagist](https://packagist.org/packages/comodojo/xmlrpc)[ Docs](http://comodojo.org)[ RSS](/packages/comodojo-xmlrpc/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (10)Used By (5)

comodojo/xmlrpc
===============

[](#comodojoxmlrpc)

[![build](https://github.com/comodojo/xmlrpc/workflows/build/badge.svg)](https://github.com/comodojo/xmlrpc/workflows/build/badge.svg) [![Latest Stable Version](https://camo.githubusercontent.com/3b7294194d698d28c5235b62015fab51a48d3817d1a72d60c961bcd3d08e877d/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f786d6c7270632f762f737461626c65)](https://packagist.org/packages/comodojo/xmlrpc) [![Total Downloads](https://camo.githubusercontent.com/03d47959341219b51d9931387990b5c981930ee39d00eefeed1ad181a216983b/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f786d6c7270632f646f776e6c6f616473)](https://packagist.org/packages/comodojo/xmlrpc) [![Latest Unstable Version](https://camo.githubusercontent.com/a6e9cae5106719eff981075e447554f4dd934642b4fda2f926cda3007f65b067/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f786d6c7270632f762f756e737461626c65)](https://packagist.org/packages/comodojo/xmlrpc) [![License](https://camo.githubusercontent.com/540ca16fe2a07bfef81d999e787a8b7238513e64c4a0f160d167ab677d013e2b/68747470733a2f2f706f7365722e707567782e6f72672f636f6d6f646f6a6f2f786d6c7270632f6c6963656e7365)](https://packagist.org/packages/comodojo/xmlrpc) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/749b8ac8d51dabcded3d4a44bf0ade003148d5f10af0d0a0f2e771cd8beb3b1f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6d6f646f6a6f2f786d6c7270632f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/comodojo/xmlrpc/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/f79335983388da054c1afdccbc56c764536e94d1d31e723cf9c7290a1175e603/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6d6f646f6a6f2f786d6c7270632f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/comodojo/xmlrpc/?branch=master) [![Quality Gate Status](https://camo.githubusercontent.com/18e2ef6757254bf8d58520a8b7e0fa0f30d6775c8b516abe48c8e7d632579b18/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636f6d6f646f6a6f5f786d6c727063266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/dashboard?id=comodojo_xmlrpc) [![Reliability Rating](https://camo.githubusercontent.com/62967c557893be0562bc3850e31649b4b4d8209e9298800f7c8786f00a16a5d9/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d636f6d6f646f6a6f5f786d6c727063266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/dashboard?id=comodojo_xmlrpc)

Yet another php xmlrpc decoder/encoder.

***This is the development branch, please do not use it in production***

Main features:

- support for `nil` and `ex:nil`
- implements true, XML compliant, HTML numeric entities conversion
- support for CDATA values

Installation
------------

[](#installation)

- Using Composer

    Install [composer](https://getcomposer.org/), then:

    `composer require comodojo/xmlrpc`

Encoding
--------

[](#encoding)

- Create an encoder instance:

    ```
    // create an encoder instance
    $encoder = new \Comodojo\Xmlrpc\XmlrpcEncoder();

    // (optional) set character encoding
    $encoder->setEncoding("utf-8");

    // (optional) use ex:nil instead of nil
    $encoder->useExNil();

    // (optional) declare special types in $data
    $encoder->setValueType($data['a_value'], "base64");
    $encoder->setValueType($data['b_value'], "datetime");
    $encoder->setValueType($data['c_value'], "cdata");

    // Wrap actions in a try/catch block (see below)
    try {

        /* encoder actions */

    } catch (\Comodojo\Exception\XmlrpcException $xe) {

        /* someting goes wrong during encoding */

    } catch (\Exception $e) {

        /* generic error */

    }
    ```
- single call:

    ```
    $call = $encoder->encodeCall("my.method", array("user"=>"john", "pass" => "doe")) ;
    ```
- multicall:

    ```
    $multicall = $encoder->encodeMulticall( array (
        "my.method" => array( "user"=>"john", "pass" => "doe" ),
        "another.method" => array( "value"=>"foo", "param" => "doe" ),
    );
    ```

    Alternate syntax (duplicated-methods safe):

    ```
    $multicall = $encoder->encodeMulticall( array (
        array( "my.method", array( "user"=>"john", "pass" => "doe" ) ),
        array( "another.method", array( "value"=>"foo", "param" => "doe" ) )
    );
    ```
- single call success response

    ```
    $response = $encoder->encodeResponse( array("success"=>true) );
    ```
- single call error response

    ```
    $error = $encoder->encodeError( 300, "Invalid parameters" );
    ```
- multicall success/error (faultString and faultCode should be explicitly declared in $data)

    ```
    $values = $encoder->encodeResponse( array(

        array("success"=>true),

        array("faultCode"=>300, "faultString"=>"Invalid parameters")

    );
    ```

Decoding
--------

[](#decoding)

- create a decoder instance:

    ```
    // create a decoder instance
    $decoder = new \Comodojo\Xmlrpc\XmlrpcDecoder();

    // Wrap actions in a try/catch block (see below)
    try {

        /* decoder actions */

    } catch (\Comodojo\Exception\XmlrpcException $xe) {

        /* someting goes wrong during decoding */

    }
    ```
- decode single or multicall

    ```
    $incoming_call = $decoder->decodeCall( $xml_data );
    ```

    In case of single request, method will return an array like:

    ```
    array (
        0 => "my.method",
        1 =>  array(
            "param_1" => "value_1",
            "param_2" => "value_2",
            ...
        )
    )
    ```

    In case of multicall:

    ```
    array (
        0 => array (
            0 => "my.method",
            1 =>  array(
                "param_1" => "value_1",
                "param_2" => "value_2",
                ...
            )
        ),
        1 => array (
            0 => "my.otherMethod",
            1 =>  array(
                "param_a" => "value_a",
                "param_b" => "value_b",
                ...
            )
        )
    )
    ```
- decode response

    ```
    $returned_data = $decoder->decodeResponse( $xml_response_data );
    ```

Documentation
-------------

[](#documentation)

- [API](https://api.comodojo.org/libs/xmlrpc/)

Contributing
------------

[](#contributing)

Contributions are welcome and will be fully credited. Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

`comodojo/xmlrpc` is released under the MIT License (MIT). Please see [License File](LICENSE) for more information.

> Copyright (c) 2018 Marco Giovinazzi
>
> For more information, visit [comodojo.org](https://comodojo.org).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 90% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~277 days

Recently: every ~261 days

Total

9

Last Release

1933d ago

Major Versions

1.1.x-dev → 2.0.02021-01-30

PHP version history (2 changes)1.0.0PHP &gt;=5.1.3

2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/4cc933c2d1b92f7fd32abb459387bff69fc8a87158b1474171ccf26139904706?d=identicon)[comodojo](/maintainers/comodojo)

---

Top Contributors

[![marcogiovinazzi](https://avatars.githubusercontent.com/u/12754673?v=4)](https://github.com/marcogiovinazzi "marcogiovinazzi (18 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")

---

Tags

comodojoxmlrpcencoderdecoder

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/comodojo-xmlrpc/health.svg)

```
[![Health](https://phpackages.com/badges/comodojo-xmlrpc/health.svg)](https://phpackages.com/packages/comodojo-xmlrpc)
```

###  Alternatives

[karriere/json-decoder

JsonDecoder implementation that allows you to convert your JSON data into PHP class objects

140425.9k12](/packages/karriere-json-decoder)[shaarli/netscape-bookmark-parser

Generic Netscape bookmark parser

2643.1k](/packages/shaarli-netscape-bookmark-parser)[darkaonline/ripcord

RPC client and server around PHP's xmlrpc library

35897.7k9](/packages/darkaonline-ripcord)[suin/json

A Simple wrapper of json\_decode() and json\_encode(). This provides object-oriented interface and exception-based error handing.

1027.6k3](/packages/suin-json)[robroypt/odoo-client

A PHP Client for Odoo using Ripcord RPC library (as used in Odoo Web API docs)

2149.4k](/packages/robroypt-odoo-client)[dflydev/base32-crockford

Encode/decode numbers using Douglas Crockford's Base32 Encoding

14379.1k1](/packages/dflydev-base32-crockford)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
