Code Monkey home page Code Monkey logo

phpxmlrpc's Introduction

XMLRPC for PHP (a.k.a. PHPXMLRPC)

A php library for building xml-rpc clients and servers.

Requirements and Installation

The recommended way to install this library is using Composer.

Detailed installation instructions are in the INSTALL.md file, along with system requirements listing.

Documentation

  • See the documentation page at gggeek.github.io/phpxmlrpc for a list of the library main features and all project related information, including information about online resources such as debuggers and demo servers.

  • The user manual can be found in the doc/manual directory: phpxmlrpc_manual.adoc. It includes sections about upgrading from previous versions and the Backwards compatibility promise as well as about running the library's testing suite and bundled debugger.

    The manual is formatted as an asciidoc file - if viewing it locally, it is recommended to either use an IDE which can natively render asciidoc, or view it as html with a browser by serving it via a webserver and accessing /doc/manual/index.html

    The latest version of the manual is also accessible online at https://github.com/gggeek/phpxmlrpc/blob/master/doc/manual/phpxmlrpc_manual.adoc

  • Automatically-generated documentation for the API is available online at http://gggeek.github.io/phpxmlrpc/doc-4/api/index.html

  • You are encouraged to look also at the code examples found in the demo/ directory.

    Note: to reduce the size of the download, the demo files are not part of the default package installed with Composer. You can either check them out online at https://github.com/gggeek/phpxmlrpc/tree/master/demo, download them as a separate tarball from https://github.com/gggeek/phpxmlrpc/releases or make sure they are available locally by installing the library using Composer option --prefer-install=source. Whatever the method chosen, make sure that the demo folder is not directly accessible from the internet, i.e. it is not within the webserver root directory).

Extras

License

Use of this software is subject to the terms in the license.txt file

License Latest Stable Version Total Downloads

Build Status Code Coverage

phpxmlrpc's People

Contributors

duzun avatar finesse avatar gggeek avatar glensc avatar hmazonderland avatar ianvanness avatar kasperfranz avatar raortegar avatar rotdrop avatar smarre avatar till avatar tuxity avatar zanbaldwin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpxmlrpc's Issues

Document Build errors

linux v3.16.7-7-desktop x86_64
php v5.6.1
phpxmlrpc-master downloaded from current set

I attempted to "make doc" the docs.

In convert.php I needed to change

$proc->setSecurityPreferences(XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE);

to

$proc->setSecurityPrefs(XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE);

Then, a missing support file:
.../tools/docbook-xsl/xhtml/chunk.xsl

Starting xsl conversion process...
PHP Warning:  XSLTProcessor::importStylesheet(): I/O warning : failed to load external entity "/home/jmoe/dev/tools/docbook-xsl/xhtml/chunk.xsl" in /home/jmoe/dev/php/phpxmlrpc-master/doc/convert.php on line 39
PHP Warning:  XSLTProcessor::importStylesheet(): compilation error: file /home/jmoe/dev/php/phpxmlrpc-master/doc/custom.xsl line 14 element import in /home/jmoe/dev/php/phpxmlrpc-master/doc/convert.php on line 39
PHP Warning:  XSLTProcessor::importStylesheet(): xsl:import : unable to load /home/jmoe/dev/tools/docbook-xsl/xhtml/chunk.xsl in /home/jmoe/dev/php/phpxmlrpc-master/doc/convert.php on line 39
PHP Warning:  XSLTProcessor::transformToXml(): No stylesheet associated to this object in /home/jmoe/dev/php/phpxmlrpc-master/doc/convert.php on line 54
OK

UTF-8 output encoding problem

I have a problem using phpxmlrpc, that occurs with czech characters. The message from server is encoded in UTF-8 and is completely okay. The output from xmlrpcresp is malformed though.

I think I found the source of the problem:
In xmlrpc.inc on line 208, $GLOBALS['xmlrpc_internalencoding'] is set to ISO-8859-1 and then, on line 2613 it's tested whether the value is one of the 3 allowed. If yes, the XML parser is forced to return data in ISOon line 2619, even if I want the output encoding to be in UTF-8. I believe this is a mistake and that the $GLOBALS['xmlrpc_internalencoding'] should not be tested at all.

Roadmap?

I've been using this XML-RPC library for quite some time now. I'm wondering when are new features expected? What can we expect? What are the plans with this project at all? A heads up would be nice.

PHP 7.2 compatibility issue

In PHP 7.2 (tested with beta 2) there's an issue in the Request class:

count(): Parameter must be an array or an object that implements Countable

/…/vendor/phpxmlrpc/phpxmlrpc/src/Request.php:291

In PHP 7.2 you will no longer be able to send strings into count() so this needs to be changed in order to support PHP 7.2

Source: https://wiki.php.net/rfc/counting_non_countables

PhpXmlRpc\Encoder::encode error

Calling the method PhpXmlRpc\Encoder::encode gives me the following error:

Fatal error: Call to undefined method Webservice_testing_tool::encode() in /Users/reinos/Sites/svn-migrate/EE/webservice/ee2/system/expressionengine/third_party/webservice/vendor/phpxmlrpc/phpxmlrpc/src/Encoder.php on line 167

After inspecting the method encode in file Encoder.php i saw that this method calls himself with $this->. After changing that to self:: the error is gone and the encoding works again.

My code:

$c = new PhpXmlRpc\Client(ee()->input->post('path'));

$x = new PhpXmlRpc\Request($_POST['method'], array(
    PhpXmlRpc\Encoder::encode(array(
        'session_id' => ee()->session->userdata('session_id')
    )),
    PhpXmlRpc\Encoder::encode($this->format_data()),
));

$c->return_type = 'phpvals';
$r =$c->send($x);

return $r;

2 calls to undefined php_xmlrpc_encode() function in Server.php

This fixes it:

On line 678, replace:
$r = new Response(php_xmlrpc_encode($r, array('extension_api')));
with:
$encoder = new Encoder();
$r = new Response($encoder->encode($r, array('extension_api')));

On line 688, replace:
$r = new Response(php_xmlrpc_encode($r, $this->phpvals_encoding_options));
with:
$encoder = new Encoder();
$r = new Response($encoder->encode($r, $this->phpvals_encoding_options));

phpxmlrpc in Docker container wrong charset

Hi,

I've recently undergone a quest to port our dev environment to Docker. I've installed Apache 2.2 and latest PHP (5.3.10) on Ubuntu 12.04 (precise). Everything there works, even our translation files (which are written in UTF-8 and presented to the browsers correctly in UTF-8 as well) apart from xml-rpc communication.

We're communicating with an external XML-RPC server using your library and it does work on a "normal" Ubuntu installation. Therefore, my question would be whether there are any special OS-specific packages or dependencies needed to enable correct UTF-8 workings?

I also have all supported UTF-8 locales installed on the system and both, mbstring and curl extensions enabled in PHP.

It kinda seems like what's being returned from the XML-RPC server cannot be read correctly (I believe we do not send any UTF-8 data TO the server). What we're getting are the standard replacement characters instead - �

Thanks :)

add a compatibility layer for the php53 branch

  1. add back xmlrpc.inc and xmlrpcs.inc which just include the corresponding classes
  2. xmlrpc should as well register in the $GLOBALS array the values which were there before
  3. the phpxmlrpc class should be initializing itself from $GLOBALS values (not a perfect solution as it does not guarantee 100% of the cases to work, but still a step forward)

Sending a rather large file via XML RPC throws an error

I finally have tweaked my server configuration so it seems I can sends large files via XML-RPX to a Wordpress install.

Although now I'm getting this error trying to send my request: "XML error: Invalid document end at line 2, column 1"

Relevant script code:
$data = new xmlrpcval($theData, "base64");

$uploads = new xmlrpcval(
  array(
    "name" => new xmlrpcval("file.mp3"),
    "type" => new xmlrpcval($mime),
    "bits" => $data 
  ), 
  "struct");

$params = array(new xmlrpcval(1,"int"),new xmlrpcval("user"),new xmlrpcval("password"),$uploads);
$msg = new xmlrpcmsg("wp.uploadFile",$params);
$client = new xmlrpc_client($endpoint); 

How could I debug an error in document end of the XML file?

Add Travis support

It would be nice to have the testsuite executed automatically on every commit, on as many php versions as possible

difficulties in enabling the xmlrpc_null_extension feature

Hi there

I need to send out xmlrpc calls (from php to python) with some NULL inside the arguments.
WIthout doing anything particular, when calling e.g.
GetPersons(array('peer_id' => NULL))
I receive at the python end
GetPersons({'peer_id' : []})
but I need to receive of course
GetPersons({'peer_id' : None})

My understanding was that I could get this to work for me by just setting these

$GLOBALS['xmlrpc_null_extension'] = true;
$GLOBALS['xmlrpc_null_apache_encoding'] = true;

but from what I see in my set up, these settings have no effect.

So I guess my question is: should the librarry behave as I expect it to, or am I misunderstanding the feature ? In particular at some point I wondered if that <nil/> business would be only recognized on the way back from the call ?

Anyway, thanks :)

Please support more internal encodings than those of the xml parser.

In particular CP1252 :)

If the set internal encoding isn't one supported by the xml parser, then the XML parser can be told output UTF-8 (which is already the case), then afterwards, the output can be transcoding the internal encoding.

For starters, I rewrote Helper\Charset::encodeEntities() to be less limited in terms of encodings (and less code):

public function encodeEntities($data, $srcEncoding = '', $destEncoding = '')
    {
        # Get/guess internal encoding
        if ($srcEncoding == '') {
            // lame, but we know no better...
            $srcEncoding = PhpXmlRpc::$xmlrpc_internalencoding;
        }
        $srcEncoding  = strtoupper($srcEncoding);
        if ($srcEncoding == 'US_ASCII') {
            $srcEncoding = 'ASCII'; # See http://www.php.net/manual/en/function.mb-list-encodings.php
        }
        $destEncoding = strtoupper($destEncoding);
        if ($destEncoding == 'US_ASCII') {
            $destEncoding = 'ASCII'; # See http://www.php.net/manual/en/function.mb-list-encodings.php
        }

        # Convert $data into destination encoding if necessary.
        if ($srcEncoding != $destEncoding) {
            if (function_exists('mb_convert_encoding')) {   # TODO store this as protected boolean or perhaps just force the requirement ext-mbstring that everyone should have by now.
                # TODO store and use a protected regex of valid mb_list_encodings()
                $data = mb_convert_encoding($data, $destEncoding, $srcEncoding);    # See http://www.php.net/manual/en/function.mb-list-encodings.php
            }           
            elseif ((($srcEncoding == 'ISO-8859-1') || ($srcEncoding == 'ASCII')) && ($destEncoding == 'UTF-8')) {
                $data = utf8_encode($data);
            }
            elseif (($destEncoding == 'ISO-8859-1') && ($srcEncoding == 'UTF-8')) {
                $data = utf8_decode($data);
            }
            elseif (function_exists('iconv')) {
                $data = iconv($srcEncoding, $destEncoding . '//TRANSLIT', $data);   # iconv() is buggy, that's why I prefer mb_convert_encoding()
            }
            else {
                error_log('XML-RPC: ' . __METHOD__ . ": Converting from $srcEncoding to $destEncoding: not supported...");
            }
        }

        # Escape XML entities
        $escapedData = htmlspecialchars(
            $data,
            ENT_QUOTES | ENT_XHTML,
            $destEncoding   # probably not necessary as the escaped characters share the same code points in all supported encodings
        );
        return $escapedData;
    }

Then I think in Request::parseResponse(), either all strings should be transcoded into the internal encoding before being passed into the Response constructor, or the Response constructor should receive the actual encoding of the strings as well as the desired internal encoding and do the transcoding as needed.

Other ideas I had reading the source code:
Perhaps replace all checks for the mbstring extension with function_exists('...').
This allows the use of identically named substitution functions.
Perhaps create a Helper\Transcoder class that performs the transcoding and supports any of mbstring, iconv, checks for supported encodings, etc.

Null => Nill value

I'm using the 53 brach and I ran into this weird bug. I created a request with a null value:

<?xml version="1.0"?>
<methodCall>
   <methodName>Article.ArticleList</methodName>
    <params>
         <param>
                <value><string>H3nrqsEQnT4Dj5R6jlAXzLJZE8knj0yWGpIHarat</string></value>
         </param>
          <param>
                <value><int>1</int></value>
          </param>
          <param>
             <value><nil/></value>
          </param>
          <param>
                <value><int>0</int></value>
          </param>
          <param>
                <value><int>0</int></value>
          </param>
          <param>
               <value><string>id</string></value>
          </param>
          <param>
                <value><string>ASC</string></value>
          </param>
    </params>
</methodCall>

Executing this call returns me this error:

<?xml version="1.0"?>
<methodResponse>
    <fault>
     <value>
        <struct>
           <member>
               <name>faultCode</name>
                <value><int>15</int></value>
            </member>
            <member>
                <name>faultString</name>
                <value><string>Invalid request payload found not-xmlrpc xml element NIL</string></value>
            </member>
         </struct>
      </value>
     </fault>
</methodResponse>

Checking the code that belongs to these checks I discovered that the $xmlrpcNull gets transformed to <nil> in the Value class serializedata() function:

case static::$xmlrpcNull:
    if (PhpXmlRpc::$xmlrpc_null_apache_encoding) {
        $rs .= "<ex:nil/>";
    } else {
        $rs .= "<nil/>";
    }
    break;

In the XMLParser class I found the xmlrpc_se function that parses the Xml, however, claims these variables are not yet supported? Or won't be supported.

case 'NIL':
case 'EX:NIL':
    if (PhpXmlRpc::$xmlrpc_null_extension) {
        if ($this->_xh['vt'] != 'value') {
            //two data elements inside a value: an error occurred!
            $this->_xh['isf'] = 2;
            $this->_xh['isf_reason'] = "$name element following a {$this->_xh['vt']} element inside a single value";

            return;
        }
        $this->_xh['ac'] = ''; // reset the accumulator
        break;
    }
// we do not support the <NIL/> extension, so
// drop through intentionally
default:
    /// INVALID ELEMENT: RAISE ISF so that it is later recognized!!!
    $this->_xh['isf'] = 2;
    $this->_xh['isf_reason'] = "found not-xmlrpc xml element $name";
    break;

How do I send my null value around? As a string?

PS: I'm also wondering if the break of the NIL and EX:NIL case is in the right place?

Automatic decoding of UTF8 within response body?

I'm currently adding UTF8 support for a library I maintain, which happens to use your very nice library.

I've noticed a quirk however. It seems that the library is automatically decoding all utf8 characters, even when I don't want it to. I've tried setting the globals for xmlrpc_defencoding and xmlrpc_internalencoding to US_ASCII, as I figure that's the least likely mode to alter my response body, but it's still decoding the utf8 bytes.

To autodetect the utf8 and decode them despite this top level setting being set to ASCII seems wrong. Am I missing something here?

Thanks in advance, and for your great work on this package.

EDIT> This is coincidentally part of WordPress, now wondering if somehow the library is taking cues from some sort of global related to mb_internal_encoding.

introduce namespaces?

pro: might make it easier to autoload stuff

con: will break 100% of the existing code out there. Unless we provide shims for everything, but that can be quite a chore, and it might force the base libs to be more complex than needed.

Any suggestion?

Encoding issue with latin-1 characters and no charset declaration in the xml prolog

Echoing this string on the test server causes an XML parse error:

Windmühle

I've found a workaround, but I'm struggling to understand why this value isn't handled.

Using this client:

http://gggeek.altervista.org/sw/xmlrpc/debugger/

Calling the "examples.echo" method with the string above as the payload

Windmühle

Produces
XMLRPC call FAILED!
Fault code: [109] Reason: 'XML error: Invalid character at line 4, column 40'

Any ideas? Thanks!

LJ.XMLRPC.getevents

An error occurred: Code: 104
Reason: 'Received from server invalid compressed HTTP'

livejournal.com

Potential issue with serializedata()?

I'm not 100% if this is intended or I am causing the problem but I have had to edit source code to get it working.

To reproduce call addParam on array:

$data['mac_list'] = [mac1, mac2];
$macs = new \PhpXmlRpc\Value($data['mac_list'], "array");
$request->addParam($macs);

Expected output:

<params>
  <param> 
    <value> 
       <array>
          <data> 
              <value> 
                   <string> mac1 </string>
              <value> 
              <value> 
                   <string> mac1 </string>
              <value> 
         </data>
      </array>
   </value>
 </param>
</params>

Actual output:

<b>Fatal error</b>:  Uncaught Error: Call to a member function serialize() on string in /srv/http/rps/vendor/phpxmlrpc/phpxmlrpc/src/Value.php:291
Stack trace:
#0 /srv/http/rps/vendor/phpxmlrpc/phpxmlrpc/src/Value.php(317): PhpXmlRpc\Value-&gt;serializedata('array', Array, '')
#1 /srv/http/rps/vendor/phpxmlrpc/phpxmlrpc/src/Request.php(59): PhpXmlRpc\Value-&gt;serialize('')
#2 /srv/http/rps/vendor/phpxmlrpc/phpxmlrpc/src/Request.php(91): PhpXmlRpc\Request-&gt;createPayload('')
#3 /srv/http/rps/scripts/rps.php(55): PhpXmlRpc\Request-&gt;serialize()
#4 /srv/http/rps/scripts/rps.php(32): xmlClient-&gt;encodeArray(Array, Object(PhpXmlRpc\Request))
#5 /srv/http/rps/scripts/rps.php(75): xmlClient-&gt;sendRequest(Array)
#6 /srv/http/rps/web/index.php(2): include('/srv/http/rps/s...')
#7 {main}
  thrown in <b>/srv/http/rps/vendor/phpxmlrpc/phpxmlrpc/src/Value.php</b> on line <b>291</b><br />

To fix I added:
$element = new \PhpXmlRpc\Value($element, "string");

To case 2 of `serializedata()' function:

 case 2:
       // array
       $rs .= "<array>\n<data>\n";
       foreach ($val as $element) {
            $element = new \PhpXmlRpc\Value($element, "string");
            $rs .= $element->serialize($charsetEncoding);
       }
       $rs .= "</data>\n</array>";
       break;

Odd conversion from UTF-8 to ISO-8859-1

Compatible ISO-8859-1 characters like åäö are converted into numeric HTML entities when they don't need to be...

In my opinion only characters that are unsupported or clashes with XML, e.g. <, > and others, should be converted into numeric HTML entities.

If I remember correctly this was not the case in the version 3.0.1 of this library.

ERROR: Failed to parse XML-RPC request: Invalid byte 1 of 1-byte UTF-8 sequence

At some point in my app, I get an error saying

Failed to parse XML-RPC request: Invalid byte 1 of 1-byte UTF-8 sequence

I went back to xmlrpc 3.0 version and I didn't receive such error.
It only happens to 4.0. It happens when I have this text encoded:

Media Mail (USPS) – 2-8 days

All of the text above are all UTF-8. Not sure why is this happening?
Any thoughts? Right now I went back to 3.0 but it shows up deprecated errors in PHP 7.

I appreciate any insights on this.

Bump php-version to 5.6 / 7

Php has also dropped support for php 5.3 / 5.4 / 5.5, also other mayor php-libraries have or are dropping support for anything php 5. It is also preventing your library from moving forward as dependencies you use are only supporting php 7+. For instance you cannot run phpunit (6) in php 7 through Travis at this point.

It would also give you the ability to drop all the old legacy code and go really bananas.

Not able to create autoload classes.

Hi,

Its a good piece of code and worked very well in regular RPC operations. Recently I was trying to upgrade PHP 7 and ultimately would like to upgrade XML RPC libraries from 2.0.1 to 4.0.1.

But while trying to compile composer, I have encountered following error. I have copy the steps from the windows command prompt.

C:\svn\Sample\phpxmlrpc>php composer.phar require phpxmlrpc/phpxmlrpc:4.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package phpxmlrpc/phpxmlrpc No version set (parsed as 1.0.0) is satisfiable by phpxmlrpc/phpxmlrpc[No version set (parsed as 1.0.0)] but those are rejected by your minimum-stability.

Installation failed, reverting ./composer.json to its original content.

Please let me know if I missing anything that creating issues while creating composer.

Thanks.

Accessing generated XML

Is there any way to get the raw XML output (for debugging purposes)? I have a bug, but can't work out where and am hoping that having access to the raw XML before it's sent to the other server (ie: the output from will be helpful.

i8 type support

Hi,

I'm working with a feed I can't change, and I've this error Invalid return payload: enable debugging to examine incoming payload xmlrpc element I8 cannot be child of VALUE because in my returning xml have <value><i8>196665</i8></value> in it.

Can't we support the i8 type in the project ?

XML error: Invalid document end at line 3, column 2096984

Hi,
i have a working XML-RPC client connection with our server. As long as i only rquest a few data, everything is fine, but if i request a large ammount of data, i ever get the same error.

Code: 2
Reason: 'Invalid return payload: enable debugging to examine incoming payload (XML error: Invalid document end at line 3, column 2096984)'

No matter, wich method i use, as long as the response is a larger dataset, this error occure.
I tried diffrent servers (Synology Nas, Xammp on my pc) and also tried diffrent connections (cabel- and mobilenetwork), so i don't think it's a network problem.
I also run a wireshark on the connection. It looks like the client close the connection after some time.

I don't know if this is a error in the script or a miss configuration of my php/apache, maybe you can point my nose at the right .

Refactor documentation source format + toolchain

Since GitHub supports natively "nice" display AsciiDoc format, we might give it a go...

Steps:

  • convert current docbook to asciidoc as doc. source
  • alter manual building toolchain so that we go asciidoc => pdf, or asciidoc => docbook => pdf
  • create GHA workflows which build the manual and api docs and upload them to the website
  • rewrite user manual to make it useful for version 4 API users, drop docs of version 3 API
  • ...
  • profit!

This will most likely happen after the build toolchain has been ported to something other than make

PHP 7 deprecation errors

Several classes in this library triggers deprecation errors with PHP 7. Example:

Methods with the same name as their class will not be constructors in a future version of PHP; 
xmlrpc_client has a deprecated constructor

Easy to fix by changing the constructor name to __construct.

Hoping for a quick patch release. Thanks!

Fault. Code: 5, Reason: Didn't receive 200 OK from remote server. (HTTP/1.1 401 Unauthorized) 1

i was using old xmlrpc. but it is not support for php7. so i changed to this phpxmlrpc. but i have some trouble. my code is not working properly. i got this message:

Fault. Code: 5, Reason: Didn't receive 200 OK from remote server. (HTTP/1.1 401 Unauthorized)

but i have data also. but i cant access because of fault code 5.
this is debug output:

---SENDING---
<?xml version="1.0"?>
<methodCall>
<methodName>listAccounts</methodName>
<params>
<param>
<value><struct>
</struct></value>
</param>
</params>
</methodCall>
---END---
---CURL INFO---
url: https://server:443/xmlapi
content_type: text/xml
http_code: 200
header_size: 666
request_size: 887
filetime: -1
ssl_verify_result: 0
redirect_count: 1
total_time: 0.465894
namelookup_time: 4.7E-5
connect_time: 4.9E-5
pretransfer_time: 0.000203
size_upload: 156
size_download: 2042
speed_download: 4382
speed_upload: 334
download_content_length: -1
upload_content_length: 156
starttransfer_time: 0.19248
redirect_time: 0.268702
redirect_url: 
primary_ip: server
certinfo: 
primary_port: 443
local_ip: 10.10.10.10
local_port: 49952
---END---
---GOT---
HTTP/1.1 401 Unauthorized
Date: Thu, 26 Oct 2017 07:46:57 GMT
Server: Apache/2.2.22 (FreeBSD) mod_wsgi/2.8 Python/2.7.2 mod_ssl/2.2.22 OpenSSL/0.9.8q DAV/2
WWW-Authenticate: Digest nonce="759641ec5958f7e6d9752d62e2559b59", opaque="a27d06b15swc043df185ccb95173bbb9", realm="XML API", qop="auth"
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
Content-Type: text/plain; charset=utf-8

HTTP/1.1 200 OK
Date: Thu, 26 Oct 2017 07:46:57 GMT
Server: Apache/2.2.22 (FreeBSD) mod_wsgi/2.8 Python/2.7.2 mod_ssl/2.2.22 OpenSSL/0.9.8q DAV/2
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
Content-Type: text/xml

<?xml version='1.0'?>
<methodResponse>
<params>
<param>
<value><struct>
<member>
<name>accounts</name>
<value><array><data>
<value><struct>
<member>
<name>username</name>
...
<value><string>OK</string></value>
</member>
</struct></value>
</param>
</params>
</methodResponse>

---END---
Fault. Code: 5, Reason: Didn't receive 200 OK from remote server. (HTTP/1.1 401 Unauthorized)

can you help me?

Feature request: make less specific date type detection in Encoder::encode

The Encoder::encode method detects a date by checking whether it is a DateTime instance. The DateTime class implements the DateTimeInterface interface which also supports the format method.

So I suggest to change DateTime to DateTimeInterface to make a DateTimeImmutable object also be detected as a date.

If you agree, I can make a pull request.

How do I create a 3 dimensional array?

Hello,
I would like to create a 3 dimensional array to send to the webservice of a website. After a number of tries, I'm still can't get it to work. Here is my code :

$getId[] = new Value(array(new Value('name'),new Value('='),new Value($data['name'])),'struct');

$testId[] = new Value($getId, 'struct');

$id = $models->send(new Request('execute_kw',array(new Value($db), new Value($uid,'int'), new Value($password), new Value($resource), new Value ('search'), new Value($testId,'array'))));

Where did I go wrong?
Thanks!

use class autoloading throughout the codebase

If we assume composer is used for deployment, all the include() and require() calls should be removed.

It remains to be seen how we deal with the case of deployment happening via tarball (the files of interest are not end-user code, but rather php files in the lib which currently include the .inc files)

Release a new version

Hello @gggeek

I'm using your library on a project, because IMHO you have the most robust implementation of XML-RPC (especially for encoding).

Unfortunately, the last release is from 2009, and today is 2014.

Could you tag a new version if your library, so that I can rely on a stable dependency, instead of dev-master?

Converting from raw XML to PHP XML-RPC

I'm having dreadful difficulties getting from very basic raw XML to the syntax used in the PHP XML-RPC script.

I can get from this basic example:
http://pastebin.com/bddsUuaw
To this, very easily:
http://pastebin.com/hbfmBbjg

But for a project I'm working on at the moment, I need to another variable for a limit in place. But I have no idea how to generate this with the PHP XML-RPC syntax and so are instead needing to use raw XML to do it, which doesn't seem very efficient.
Here is the raw XML I'm trying to convert from ... http://pastebin.com/tYWyMWR0

Does anyone know how to do this? Or alternatively, able to point me in the direction of some example code? I've been bashing away on this for days, but am failing miserably :/ Thanks for any help you can provide :)

PhpXmlRpc request

I have this function zyyne.listLoad(X), Can anyone PLEASE show me how I can get results using PhpXmlRpc, I read the documentation twice but couldn't get my head around it

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.