Compatibility of nusoap with PHP8

This commit is contained in:
Laurent Destailleur 2020-12-12 15:37:15 +01:00
parent 4013eaa239
commit 5f476e7e7e
18 changed files with 625 additions and 435 deletions

495
composer.lock generated
View File

@ -6,53 +6,6 @@
],
"content-hash": "1dbd2d05cc0836acfca5988f29005cf2",
"packages": [
{
"name": "Psr/log",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2020-03-23T09:12:05+00:00"
},
{
"name": "ckeditor/ckeditor",
"version": "4.12.1",
@ -92,6 +45,12 @@
"text",
"wysiwyg"
],
"support": {
"forum": "http://ckeditor.com/forums",
"issues": "http://dev.ckeditor.com",
"source": "http://github.com/ckeditor/ckeditor-dev",
"wiki": "http://docs.ckeditor.com"
},
"time": "2019-06-28T10:41:23+00:00"
},
{
@ -153,6 +112,10 @@
"debug",
"debugbar"
],
"support": {
"issues": "https://github.com/maximebf/php-debugbar/issues",
"source": "https://github.com/maximebf/php-debugbar/tree/v1.15.1"
},
"time": "2019-09-24T14:55:42+00:00"
},
{
@ -208,6 +171,10 @@
"print",
"receipt"
],
"support": {
"issues": "https://github.com/mike42/escpos-php/issues",
"source": "https://github.com/mike42/escpos-php/tree/v2.2"
},
"time": "2019-10-05T05:59:00+00:00"
},
{
@ -260,6 +227,10 @@
"mobile detector",
"php mobile detect"
],
"support": {
"issues": "https://github.com/serbanghita/Mobile-Detect/issues",
"source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.34"
},
"time": "2019-09-18T18:44:20+00:00"
},
{
@ -362,9 +333,63 @@
"xls",
"xlsx"
],
"support": {
"issues": "https://github.com/PHPOffice/PHPExcel/issues",
"source": "https://github.com/PHPOffice/PHPExcel/tree/master"
},
"abandoned": "phpoffice/phpspreadsheet",
"time": "2015-05-01T07:00:55+00:00"
},
{
"name": "psr/log",
"version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc",
"reference": "0f73288fd15629204f9d42b7055f72dacbe811fc",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.1.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"support": {
"source": "https://github.com/php-fig/log/tree/1.1.3"
},
"time": "2020-03-23T09:12:05+00:00"
},
{
"name": "restler/framework",
"version": "3.0.0-RC6",
@ -424,6 +449,9 @@
"rest",
"server"
],
"support": {
"source": "https://github.com/Luracast/Restler-Framework/tree/3.0.0-RC6"
},
"time": "2020-02-13T16:05:12+00:00"
},
{
@ -480,24 +508,28 @@
"payment processing",
"stripe"
],
"support": {
"issues": "https://github.com/stripe/stripe-php/issues",
"source": "https://github.com/stripe/stripe-php/tree/master"
},
"time": "2019-08-29T16:56:12+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.18.1",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
"reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/39d483bdf39be819deabf04ec872eb0b2410b531",
"reference": "39d483bdf39be819deabf04ec872eb0b2410b531",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-mbstring": "For best performance"
@ -505,7 +537,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
@ -543,6 +575,9 @@
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.20.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
@ -557,7 +592,7 @@
"type": "tidelift"
}
],
"time": "2020-07-14T12:35:20+00:00"
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/var-dumper",
@ -620,6 +655,9 @@
"debug",
"dump"
],
"support": {
"source": "https://github.com/symfony/var-dumper/tree/master"
},
"time": "2015-11-18T13:48:51+00:00"
},
{
@ -682,40 +720,40 @@
"pdf417",
"qrcode"
],
"support": {
"source": "https://github.com/tecnickcom/TCPDF/tree/6.3.2"
},
"time": "2019-09-20T09:35:01+00:00"
}
],
"packages-dev": [
{
"name": "doctrine/instantiator",
"version": "1.0.5",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
"reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
"url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b",
"reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b",
"shasum": ""
},
"require": {
"php": ">=5.3,<8.0-DEV"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"athletic/athletic": "~0.1.8",
"doctrine/coding-standard": "^8.0",
"ext-pdo": "*",
"ext-phar": "*",
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~2.0"
"phpbench/phpbench": "^0.13 || 1.0.0-alpha2",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
@ -729,38 +767,59 @@
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com",
"homepage": "http://ocramius.github.com/"
"homepage": "https://ocramius.github.io/"
}
],
"description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
"homepage": "https://github.com/doctrine/instantiator",
"homepage": "https://www.doctrine-project.org/projects/instantiator.html",
"keywords": [
"constructor",
"instantiate"
],
"time": "2015-06-14T21:17:01+00:00"
"support": {
"issues": "https://github.com/doctrine/instantiator/issues",
"source": "https://github.com/doctrine/instantiator/tree/1.4.0"
},
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator",
"type": "tidelift"
}
],
"time": "2020-11-10T18:47:58+00:00"
},
{
"name": "php-parallel-lint/php-console-color",
"version": "v0.2",
"version": "v0.3",
"source": {
"type": "git",
"url": "https://github.com/php-parallel-lint/PHP-Console-Color.git",
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191"
"reference": "b6af326b2088f1ad3b264696c9fd590ec395b49e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191",
"reference": "d5deaecff52a0d61ccb613bb3804088da0307191",
"url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/b6af326b2088f1ad3b264696c9fd590ec395b49e",
"reference": "b6af326b2088f1ad3b264696c9fd590ec395b49e",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"replace": {
"jakub-onderka/php-console-color": "*"
},
"require-dev": {
"jakub-onderka/php-code-style": "1.0",
"jakub-onderka/php-parallel-lint": "1.0",
"jakub-onderka/php-var-dump-check": "0.*",
"php-parallel-lint/php-code-style": "1.0",
"php-parallel-lint/php-parallel-lint": "1.0",
"php-parallel-lint/php-var-dump-check": "0.*",
"phpunit/phpunit": "~4.3",
"squizlabs/php_codesniffer": "1.*"
},
@ -780,7 +839,11 @@
"email": "jakub.onderka@gmail.com"
}
],
"time": "2018-09-29T17:23:10+00:00"
"support": {
"issues": "https://github.com/php-parallel-lint/PHP-Console-Color/issues",
"source": "https://github.com/php-parallel-lint/PHP-Console-Color/tree/master"
},
"time": "2020-05-14T05:47:14+00:00"
},
{
"name": "php-parallel-lint/php-console-highlighter",
@ -829,6 +892,10 @@
}
],
"description": "Highlight PHP code in terminal",
"support": {
"issues": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/issues",
"source": "https://github.com/php-parallel-lint/PHP-Console-Highlighter/tree/master"
},
"time": "2020-05-13T07:37:49+00:00"
},
{
@ -876,39 +943,37 @@
],
"description": "This tool check syntax of PHP files about 20x faster than serial check.",
"homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint",
"support": {
"source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v0.9.2"
},
"time": "2015-12-15T10:42:16+00:00"
},
{
"name": "phpdocumentor/reflection-common",
"version": "1.0.1",
"version": "2.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b",
"shasum": ""
},
"require": {
"php": ">=5.5"
},
"require-dev": {
"phpunit/phpunit": "^4.6"
"php": "^7.2 || ^8.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-2.x": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src"
]
"phpDocumentor\\Reflection\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -930,44 +995,45 @@
"reflection",
"static analysis"
],
"time": "2017-09-11T18:02:19+00:00"
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionCommon/issues",
"source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x"
},
"time": "2020-06-27T09:03:43+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
"version": "4.3.2",
"version": "5.2.2",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e"
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
"reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556",
"reference": "069a785b2141f5bcf49f3e353548dc1cce6df556",
"shasum": ""
},
"require": {
"php": "^7.0",
"phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
"phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
"webmozart/assert": "^1.0"
"ext-filter": "*",
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.3",
"webmozart/assert": "^1.9.1"
},
"require-dev": {
"doctrine/instantiator": "^1.0.5",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^6.4"
"mockery/mockery": "~1.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.x-dev"
"dev-master": "5.x-dev"
}
},
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
"src/"
]
"phpDocumentor\\Reflection\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@ -978,37 +1044,44 @@
{
"name": "Mike van Riel",
"email": "me@mikevanriel.com"
},
{
"name": "Jaap van Otterdijk",
"email": "account@ijaap.nl"
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2019-09-12T14:27:41+00:00"
"support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master"
},
"time": "2020-09-03T19:13:55+00:00"
},
{
"name": "phpdocumentor/type-resolver",
"version": "0.5.1",
"version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "cf842904952e64e703800d094cdf34e715a8a3ae"
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/cf842904952e64e703800d094cdf34e715a8a3ae",
"reference": "cf842904952e64e703800d094cdf34e715a8a3ae",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0",
"shasum": ""
},
"require": {
"php": "^7.0",
"phpdocumentor/reflection-common": "^1.0"
"php": "^7.2 || ^8.0",
"phpdocumentor/reflection-common": "^2.0"
},
"require-dev": {
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^6.4"
"ext-tokenizer": "*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
"dev-1.x": "1.x-dev"
}
},
"autoload": {
@ -1026,37 +1099,42 @@
"email": "me@mikevanriel.com"
}
],
"time": "2017-12-30T13:23:38+00:00"
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0"
},
"time": "2020-09-17T18:55:26+00:00"
},
{
"name": "phpspec/prophecy",
"version": "1.9.0",
"version": "v1.10.3",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203"
"reference": "451c3cd1418cf640de218914901e51b064abb093"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203",
"reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203",
"url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093",
"reference": "451c3cd1418cf640de218914901e51b064abb093",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
"phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0",
"sebastian/comparator": "^1.1|^2.0|^3.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
"sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0"
},
"require-dev": {
"phpspec/phpspec": "^2.5|^3.2",
"phpspec/phpspec": "^2.5 || ^3.2",
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8.x-dev"
"dev-master": "1.10.x-dev"
}
},
"autoload": {
@ -1089,7 +1167,11 @@
"spy",
"stub"
],
"time": "2019-10-03T11:07:50+00:00"
"support": {
"issues": "https://github.com/phpspec/prophecy/issues",
"source": "https://github.com/phpspec/prophecy/tree/v1.10.3"
},
"time": "2020-03-05T15:02:03+00:00"
},
{
"name": "phpunit/php-code-coverage",
@ -1151,6 +1233,11 @@
"testing",
"xunit"
],
"support": {
"irc": "irc://irc.freenode.net/phpunit",
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/2.2"
},
"time": "2015-10-06T15:47:00+00:00"
},
{
@ -1198,6 +1285,11 @@
"filesystem",
"iterator"
],
"support": {
"irc": "irc://irc.freenode.net/phpunit",
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
"source": "https://github.com/sebastianbergmann/php-file-iterator/tree/1.4.5"
},
"time": "2017-11-27T13:52:08+00:00"
},
{
@ -1239,6 +1331,10 @@
"keywords": [
"template"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
"source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1"
},
"time": "2015-06-21T13:50:34+00:00"
},
{
@ -1288,6 +1384,10 @@
"keywords": [
"timer"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
"source": "https://github.com/sebastianbergmann/php-timer/tree/master"
},
"time": "2017-02-26T11:10:40+00:00"
},
{
@ -1337,6 +1437,10 @@
"keywords": [
"tokenizer"
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-token-stream/issues",
"source": "https://github.com/sebastianbergmann/php-token-stream/tree/1.4"
},
"abandoned": true,
"time": "2017-12-04T08:55:13+00:00"
},
@ -1410,6 +1514,10 @@
"testing",
"xunit"
],
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/4.8.36"
},
"time": "2017-06-21T08:07:12+00:00"
},
{
@ -1466,6 +1574,11 @@
"mock",
"xunit"
],
"support": {
"irc": "irc://irc.freenode.net/phpunit",
"issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues",
"source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/2.3"
},
"abandoned": true,
"time": "2015-10-02T06:51:40+00:00"
},
@ -1531,6 +1644,11 @@
"testing",
"xunit"
],
"support": {
"irc": "irc://irc.freenode.net/phpunit",
"issues": "https://github.com/sebastianbergmann/phpunit-selenium/issues",
"source": "https://github.com/giorgiosironi/phpunit-selenium/tree/2.x"
},
"time": "2017-01-23T22:15:32+00:00"
},
{
@ -1595,6 +1713,10 @@
"compare",
"equality"
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
"source": "https://github.com/sebastianbergmann/comparator/tree/1.2"
},
"time": "2017-01-29T09:50:25+00:00"
},
{
@ -1647,6 +1769,10 @@
"keywords": [
"diff"
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
"source": "https://github.com/sebastianbergmann/diff/tree/1.4"
},
"time": "2017-05-22T07:24:03+00:00"
},
{
@ -1697,6 +1823,10 @@
"environment",
"hhvm"
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
"source": "https://github.com/sebastianbergmann/environment/tree/1.3"
},
"time": "2016-08-18T05:49:44+00:00"
},
{
@ -1764,6 +1894,10 @@
"export",
"exporter"
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
"source": "https://github.com/sebastianbergmann/exporter/tree/master"
},
"time": "2016-06-17T09:04:28+00:00"
},
{
@ -1815,6 +1949,10 @@
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
"source": "https://github.com/sebastianbergmann/global-state/tree/1.1.1"
},
"time": "2015-10-12T03:26:01+00:00"
},
{
@ -1868,6 +2006,10 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
"source": "https://github.com/sebastianbergmann/recursion-context/tree/master"
},
"time": "2016-10-03T07:41:43+00:00"
},
{
@ -1903,6 +2045,10 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
"source": "https://github.com/sebastianbergmann/version/tree/1.0.6"
},
"time": "2015-06-21T13:59:46+00:00"
},
{
@ -1981,24 +2127,29 @@
"phpcs",
"standards"
],
"support": {
"issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2018-11-07T22:31:41+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.12.0",
"version": "v1.20.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "550ebaac289296ce228a706d0867afc34687e3f4"
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
"reference": "550ebaac289296ce228a706d0867afc34687e3f4",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"reference": "f4ba089a5b6366e453971d3aad5fe8e897b37f41",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=7.1"
},
"suggest": {
"ext-ctype": "For best performance"
@ -2006,7 +2157,11 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.12-dev"
"dev-main": "1.20-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
@ -2039,20 +2194,37 @@
"polyfill",
"portable"
],
"time": "2019-08-06T08:03:45+00:00"
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.20.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-23T14:02:19+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.4.32",
"version": "v3.4.47",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "768f817446da74a776a31eea335540f9dcb53942"
"reference": "88289caa3c166321883f67fe5130188ebbb47094"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/768f817446da74a776a31eea335540f9dcb53942",
"reference": "768f817446da74a776a31eea335540f9dcb53942",
"url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094",
"reference": "88289caa3c166321883f67fe5130188ebbb47094",
"shasum": ""
},
"require": {
@ -2069,11 +2241,6 @@
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
@ -2098,35 +2265,51 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2019-09-10T10:38:46+00:00"
"support": {
"source": "https://github.com/symfony/yaml/tree/v3.4.47"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2020-10-24T10:57:07+00:00"
},
{
"name": "webmozart/assert",
"version": "1.5.0",
"version": "1.9.1",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4"
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4",
"reference": "88e6d84706d09a236046d686bbea96f07b3a34f4",
"url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389",
"reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389",
"shasum": ""
},
"require": {
"php": "^5.3.3 || ^7.0",
"php": "^5.3.3 || ^7.0 || ^8.0",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
}
},
"autoload": {
"psr-4": {
"Webmozart\\Assert\\": "src/"
@ -2148,7 +2331,11 @@
"check",
"validate"
],
"time": "2019-08-24T08:43:50+00:00"
"support": {
"issues": "https://github.com/webmozart/assert/issues",
"source": "https://github.com/webmozart/assert/tree/master"
},
"time": "2020-07-08T17:02:28+00:00"
}
],
"aliases": [],

View File

@ -48,6 +48,7 @@ By
* In file nusoap.php, to avoid a warning,
Replace call to serialize_val with no bugged value
* In all files, replace constructor names into __construct. Replace also parent::constructor_name with parent::__construct

View File

@ -219,7 +219,7 @@ class nusoap_base {
*
* @access public
*/
function nusoap_base() {
function __construct() {
$this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'];
}

View File

@ -44,8 +44,8 @@ class nusoap_fault extends nusoap_base {
* @param string $faultstring human readable error message
* @param mixed $faultdetail detail, typically a string or array of string
*/
function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
parent::nusoap_base();
function __construct($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
parent::__construct();
$this->faultcode = $faultcode;
$this->faultactor = $faultactor;
$this->faultstring = $faultstring;

View File

@ -56,8 +56,8 @@ class nusoap_parser extends nusoap_base {
* @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1
* @access public
*/
function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
parent::nusoap_base();
function __construct($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
parent::__construct();
$this->xml = $xml;
$this->xml_encoding = $encoding;
$this->method = $method;
@ -316,7 +316,7 @@ class nusoap_parser extends nusoap_base {
// get unqualified name
$name = substr(strstr($name,':'),1);
}
// build to native type
if(isset($this->body_position) && $pos > $this->body_position){
// deal w/ multirefs
@ -378,7 +378,7 @@ class nusoap_parser extends nusoap_base {
*/
}
}
// for doclit
if($this->status == 'header'){
if ($this->root_header != $pos) {

View File

@ -169,8 +169,8 @@ class nusoap_server extends nusoap_base {
* @param mixed $wsdl file path or URL (string), or wsdl instance (object)
* @access public
*/
function nusoap_server($wsdl=false){
parent::nusoap_base();
function __construct($wsdl=false){
parent::__construct();
// turn on debugging?
global $debug;
global $HTTP_SERVER_VARS;
@ -776,7 +776,7 @@ class nusoap_server extends nusoap_base {
//begin code to compress payload - by John
// NOTE: there is no way to know whether the Web server will also compress
// this data.
if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) {
if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) {
if (strstr($this->headers['accept-encoding'], 'gzip')) {
if (function_exists('gzencode')) {
if (isset($this->debug_flag) && $this->debug_flag) {
@ -903,7 +903,7 @@ class nusoap_server extends nusoap_base {
function getHTTPBody($soapmsg) {
return $soapmsg;
}
/**
* gets the HTTP content type for the current response.
*
@ -915,7 +915,7 @@ class nusoap_server extends nusoap_base {
function getHTTPContentType() {
return 'text/xml';
}
/**
* gets the HTTP content type charset for the current response.
* returns false for non-text content types.
@ -1074,7 +1074,7 @@ class nusoap_server extends nusoap_base {
if(false == $namespace) {
$namespace = "http://$SERVER_NAME/soap/$serviceName";
}
if(false == $endpoint) {
if ($HTTPS == '1' || $HTTPS == 'on') {
$SCHEME = 'https';
@ -1083,11 +1083,11 @@ class nusoap_server extends nusoap_base {
}
$endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME";
}
if(false == $schemaTargetNamespace) {
$schemaTargetNamespace = $namespace;
}
$this->wsdl = new wsdl;
$this->wsdl->serviceName = $serviceName;
$this->wsdl->endpoint = $endpoint;

View File

@ -56,8 +56,8 @@ class soap_transport_http extends nusoap_base {
* @param boolean $use_curl Whether to try to force cURL use
* @access public
*/
function soap_transport_http($url, $curl_options = NULL, $use_curl = false){
parent::nusoap_base();
function __construct($url, $curl_options = NULL, $use_curl = false){
parent::__construct();
$this->debug("ctor url=$url use_curl=$use_curl curl_options:");
$this->appendDebug($this->varDump($curl_options));
$this->setURL($url);
@ -121,12 +121,12 @@ class soap_transport_http extends nusoap_base {
$this->debug("parsed URL $k = $v");
$this->$k = $v;
}
// add any GET params to path
if(isset($u['query']) && $u['query'] != ''){
$this->path .= '?' . $u['query'];
}
// set default port
if(!isset($u['port'])){
if($u['scheme'] == 'https'){
@ -135,10 +135,10 @@ class soap_transport_http extends nusoap_base {
$this->port = 80;
}
}
$this->uri = $this->path;
$this->digest_uri = $this->uri;
// build headers
if (!isset($u['port'])) {
$this->setHeader('Host', $this->host);
@ -218,7 +218,7 @@ class soap_transport_http extends nusoap_base {
} else {
$this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str);
}
// test pointer
if(!$this->fp) {
$msg = 'Couldn\'t open socket connection to server ' . $this->url;
@ -231,7 +231,7 @@ class soap_transport_http extends nusoap_base {
$this->setError($msg);
return false;
}
// set response timeout
$this->debug('set response timeout to ' . $response_timeout);
socket_set_timeout( $this->fp, $response_timeout);
@ -320,10 +320,10 @@ class soap_transport_http extends nusoap_base {
// recent versions of cURL turn on peer/host checking by default,
// while PHP binaries are not compiled with a default location for the
// CA cert bundle, so disable peer/host checking.
//$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt');
//$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt');
$this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0);
$this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0);
// support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo)
if ($this->authtype == 'certificate') {
$this->debug('set cURL certificate options');
@ -410,7 +410,7 @@ class soap_transport_http extends nusoap_base {
* @access public
*/
function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) {
$this->debug('entered send() with data of length: '.strlen($data));
$this->tryagain = true;
@ -422,18 +422,18 @@ class soap_transport_http extends nusoap_base {
if (!$this->connect($timeout, $response_timeout)){
return false;
}
// send request
if (!$this->sendRequest($data, $cookies)){
return false;
}
// get response
$respdata = $this->getResponse();
} else {
$this->setError("Too many tries to get an OK response ($this->response_status_line)");
}
}
}
$this->debug('end of send()');
return $respdata;
}
@ -453,7 +453,7 @@ class soap_transport_http extends nusoap_base {
function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) {
return $this->send($data, $timeout, $response_timeout, $cookies);
}
/**
* if authenticating, set user credentials here
*
@ -475,21 +475,21 @@ class soap_transport_http extends nusoap_base {
} elseif ($authtype == 'digest') {
if (isset($digestRequest['nonce'])) {
$digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1;
// calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html)
// A1 = unq(username-value) ":" unq(realm-value) ":" passwd
$A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password;
// H(A1) = MD5(A1)
$HA1 = md5($A1);
// A2 = Method ":" digest-uri-value
$A2 = $this->request_method . ':' . $this->digest_uri;
// H(A2)
$HA2 = md5($A2);
// KD(secret, data) = H(concat(secret, ":", data))
// if qop == auth:
// request-digest = <"> < KD ( H(A1), unq(nonce-value)
@ -500,7 +500,7 @@ class soap_transport_http extends nusoap_base {
// ) <">
// if qop is missing,
// request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <">
$unhashedDigest = '';
$nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : '';
$cnonce = $nonce;
@ -509,10 +509,10 @@ class soap_transport_http extends nusoap_base {
} else {
$unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2;
}
$hashedDigest = md5($unhashedDigest);
$opaque = '';
$opaque = '';
if (isset($digestRequest['opaque'])) {
$opaque = ', opaque="' . $digestRequest['opaque'] . '"';
}
@ -531,7 +531,7 @@ class soap_transport_http extends nusoap_base {
$this->authtype = $authtype;
$this->digestRequest = $digestRequest;
}
/**
* set the soapaction value
*
@ -541,7 +541,7 @@ class soap_transport_http extends nusoap_base {
function setSOAPAction($soapaction) {
$this->setHeader('SOAPAction', '"' . $soapaction . '"');
}
/**
* use http encoding
*
@ -561,7 +561,7 @@ class soap_transport_http extends nusoap_base {
$this->encoding = $enc;
}
}
/**
* set proxy info here
*
@ -590,7 +590,7 @@ class soap_transport_http extends nusoap_base {
unsetHeader('Proxy-Authorization');
}
}
/**
* Test if the given string starts with a header that is to be skipped.
@ -631,7 +631,7 @@ class soap_transport_http extends nusoap_base {
// length := 0
$length = 0;
$new = '';
// read chunk-size, chunk-extension (if any) and CRLF
// get the position of the linebreak
$chunkend = strpos($buffer, $lb);
@ -646,7 +646,7 @@ class soap_transport_http extends nusoap_base {
while ($chunk_size > 0) {
$this->debug("chunkstart: $chunkstart chunk_size: $chunk_size");
$chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size);
// Just in case we got a broken connection
if ($chunkend == FALSE) {
$chunk = substr($buffer,$chunkstart);
@ -655,7 +655,7 @@ class soap_transport_http extends nusoap_base {
$length += strlen($chunk);
break;
}
// read chunk-data and CRLF
$chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart);
// append chunk-data to entity-body
@ -664,7 +664,7 @@ class soap_transport_http extends nusoap_base {
$length += strlen($chunk);
// read chunk-size and CRLF
$chunkstart = $chunkend + strlen($lb);
$chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb);
if ($chunkend == FALSE) {
break; //Just in case we got a broken connection
@ -675,7 +675,7 @@ class soap_transport_http extends nusoap_base {
}
return $new;
}
/**
* Writes the payload, including HTTP headers, to $this->outgoing_payload.
*
@ -720,7 +720,7 @@ class soap_transport_http extends nusoap_base {
// header/body separator
$this->outgoing_payload .= "\r\n";
// add data
$this->outgoing_payload .= $data;
}
@ -792,7 +792,7 @@ class soap_transport_http extends nusoap_base {
*/
function getResponse(){
$this->incoming_payload = '';
if ($this->io_method() == 'socket') {
// loop until headers have been retrieved
$data = '';
@ -863,7 +863,7 @@ class soap_transport_http extends nusoap_base {
$this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
}
}
// loop until msg has been received
if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') {
$content_length = 2147483647; // ignore any content-length header
@ -929,22 +929,22 @@ class soap_transport_http extends nusoap_base {
$this->debug('read body of length ' . strlen($data));
$this->incoming_payload .= $data;
$this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server');
// close filepointer
if(
(isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') ||
(isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') ||
(! $this->persistentConnection) || feof($this->fp)){
fclose($this->fp);
$this->fp = false;
$this->debug('closed socket');
}
// connection was closed unexpectedly
if($this->incoming_payload == ''){
$this->setError('no response from server');
return false;
}
// decode transfer-encoding
// if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){
// if(!$data = $this->decodeChunked($data, $lb)){
@ -955,7 +955,7 @@ class soap_transport_http extends nusoap_base {
// set decoded payload
// $this->incoming_payload = $header_data.$lb.$lb.$data;
// }
} else if ($this->io_method() == 'curl') {
// send and receive
$this->debug('send and receive with cURL');
@ -981,7 +981,7 @@ class soap_transport_http extends nusoap_base {
// close curl
$this->debug('No cURL error, closing cURL');
curl_close($this->ch);
// try removing skippable headers
$savedata = $data;
while ($this->isSkippableCurlHeader($data)) {
@ -1004,7 +1004,7 @@ class soap_transport_http extends nusoap_base {
}
}
}
// separate content from HTTP headers
if ($pos = strpos($data,"\r\n\r\n")) {
$lb = "\r\n";
@ -1064,7 +1064,7 @@ class soap_transport_http extends nusoap_base {
$this->debug('Server wants digest authentication');
// remove "Digest " from our elements
$digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']);
// parse elements into array
$digestElements = explode(',', $digestString);
foreach ($digestElements as $val) {
@ -1083,7 +1083,7 @@ class soap_transport_http extends nusoap_base {
$this->setError('HTTP authentication failed');
return false;
}
if (
($http_status >= 300 && $http_status <= 307) ||
($http_status >= 400 && $http_status <= 417) ||
@ -1151,13 +1151,13 @@ class soap_transport_http extends nusoap_base {
} else {
$this->debug('No Content-Encoding header');
}
if(strlen($data) == 0){
$this->debug('no data after headers!');
$this->setError('no data present after HTTP headers');
return false;
}
return $data;
}
@ -1229,7 +1229,7 @@ class soap_transport_http extends nusoap_base {
} else {
$path = '/';
}
$cookie_param = ';secure;';
if (strpos($cookie_str, $cookie_param) !== FALSE) {
$secure = true;
@ -1248,12 +1248,12 @@ class soap_transport_http extends nusoap_base {
'path' => $path,
'expires' => $expires,
'secure' => $secure
);
);
return $cookie;
}
return false;
}
/**
* sort out cookies for the current request
*

View File

@ -68,8 +68,8 @@ class soapval extends nusoap_base {
* @param mixed $attributes associative array of attributes to add to element serialization
* @access public
*/
function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) {
parent::nusoap_base();
function __construct($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) {
parent::__construct();
$this->name = $name;
$this->type = $type;
$this->value = $value;

View File

@ -94,8 +94,8 @@ class nusoap_client extends nusoap_base {
* @param string $portName optional portName in WSDL document
* @access public
*/
function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
parent::nusoap_base();
function __construct($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
parent::__construct();
$this->endpoint = $endpoint;
$this->proxyhost = $proxyhost;
$this->proxyport = $proxyport;
@ -163,7 +163,7 @@ class nusoap_client extends nusoap_base {
$this->faultstring = '';
$this->faultcode = '';
$this->opData = array();
$this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType");
$this->appendDebug('params=' . $this->varDump($params));
$this->appendDebug('headers=' . $this->varDump($headers));
@ -234,7 +234,7 @@ class nusoap_client extends nusoap_base {
// no WSDL
//$this->namespaces['ns1'] = $namespace;
$nsPrefix = 'ns' . rand(1000, 9999);
// serialize
// serialize
$payload = '';
if (is_string($params)) {
$this->debug("serializing param string for operation $operation");
@ -294,7 +294,7 @@ class nusoap_client extends nusoap_base {
$this->return = $return;
$this->debug('sent message successfully and got a(n) '.gettype($return));
$this->appendDebug('return=' . $this->varDump($return));
// fault?
if(is_array($return) && isset($return['faultcode'])){
$this->debug('got fault');
@ -463,7 +463,7 @@ class nusoap_client extends nusoap_base {
$this->persistentConnection = $http;
}
}
if($err = $http->getError()){
$this->setError('HTTP Error: '.$err);
return false;
@ -627,7 +627,7 @@ class nusoap_client extends nusoap_base {
$this->authtype = $authtype;
$this->certRequest = $certRequest;
}
/**
* use HTTP encoding
*
@ -638,7 +638,7 @@ class nusoap_client extends nusoap_base {
$this->debug("setHTTPEncoding(\"$enc\")");
$this->http_encoding = $enc;
}
/**
* Set whether to try to use cURL connections if possible
*
@ -659,7 +659,7 @@ class nusoap_client extends nusoap_base {
$this->debug("useHTTPPersistentConnection");
$this->persistentConnection = true;
}
/**
* gets the default RPC parameter setting.
* If true, default is that call params are like RPC even for document style.
@ -689,7 +689,7 @@ class nusoap_client extends nusoap_base {
function setDefaultRpcParams($rpcParams) {
$this->defaultRpcParams = $rpcParams;
}
/**
* dynamically creates an instance of a proxy class,
* allowing user to directly call methods from wsdl
@ -819,7 +819,7 @@ class nusoap_client extends nusoap_base {
function getHTTPBody($soapmsg) {
return $soapmsg;
}
/**
* gets the HTTP content type for the current request.
*
@ -831,7 +831,7 @@ class nusoap_client extends nusoap_base {
function getHTTPContentType() {
return 'text/xml';
}
/**
* gets the HTTP content type charset for the current request.
* returns false for non-text content types.

View File

@ -6,14 +6,14 @@
/**
* parses a WSDL file, allows access to it's data, other utility methods.
* also builds WSDL structures programmatically.
*
*
* @author Dietrich Ayala <dietrich@ganx4.com>
* @author Scott Nichol <snichol@users.sourceforge.net>
* @access public
* @access public
*/
class wsdl extends nusoap_base {
// URL or filename of the root of this WSDL
var $wsdl;
var $wsdl;
// define internal arrays of bindings, ports, operations, messages, etc.
var $schemas = array();
var $currentSchema;
@ -31,9 +31,9 @@ class wsdl extends nusoap_base {
var $opData = array();
var $status = '';
var $documentation = false;
var $endpoint = '';
var $endpoint = '';
// array of wsdl docs to import
var $import = array();
var $import = array();
// parser vars
var $parser;
var $position = 0;
@ -56,7 +56,7 @@ class wsdl extends nusoap_base {
/**
* constructor
*
*
* @param string $wsdl WSDL document URL
* @param string $proxyhost
* @param string $proxyport
@ -66,10 +66,10 @@ class wsdl extends nusoap_base {
* @param integer $response_timeout set the response timeout
* @param array $curl_options user-specified cURL options
* @param boolean $use_curl try to use cURL
* @access public
* @access public
*/
function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){
parent::nusoap_base();
function __construct($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){
parent::__construct();
$this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout");
$this->proxyhost = $proxyhost;
$this->proxyport = $proxyport;
@ -126,7 +126,7 @@ class wsdl extends nusoap_base {
}
}
}
}
}
}
}
// WSDL imports
@ -152,18 +152,18 @@ class wsdl extends nusoap_base {
}
}
}
}
}
}
// add new data to operation data
foreach($this->bindings as $binding => $bindingData) {
if (isset($bindingData['operations']) && is_array($bindingData['operations'])) {
foreach($bindingData['operations'] as $operation => $data) {
$this->debug('post-parse data gathering for ' . $operation);
$this->bindings[$binding]['operations'][$operation]['input'] =
isset($this->bindings[$binding]['operations'][$operation]['input']) ?
$this->bindings[$binding]['operations'][$operation]['input'] =
isset($this->bindings[$binding]['operations'][$operation]['input']) ?
array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) :
$this->portTypes[ $bindingData['portType'] ][$operation]['input'];
$this->bindings[$binding]['operations'][$operation]['output'] =
$this->bindings[$binding]['operations'][$operation]['output'] =
isset($this->bindings[$binding]['operations'][$operation]['output']) ?
array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) :
$this->portTypes[ $bindingData['portType'] ][$operation]['output'];
@ -180,16 +180,16 @@ class wsdl extends nusoap_base {
$this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : '';
$this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : '';
$this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : '';
}
}
}
}
}
}
/**
* parses the wsdl document
*
*
* @param string $wsdl path or URL
* @access private
* @access private
*/
function parseWSDL($wsdl = '') {
$this->debug("parse WSDL at path=$wsdl");
@ -199,7 +199,7 @@ class wsdl extends nusoap_base {
$this->setError('no wsdl passed to parseWSDL()!!');
return false;
}
// parse $wsdl for url format
$wsdl_props = parse_url($wsdl);
@ -242,24 +242,24 @@ class wsdl extends nusoap_base {
$wsdl_string = '';
while ($data = fread($fp, 32768)) {
$wsdl_string .= $data;
}
}
fclose($fp);
} else {
$errstr = "Bad path to WSDL file $path";
$this->debug($errstr);
$this->setError($errstr);
return false;
}
}
}
$this->debug('Parse WSDL');
// end new code added
// Create an XML parser.
$this->parser = xml_parser_create();
$this->parser = xml_parser_create();
// Set the options for parsing the XML data.
// xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
// Set the object for the parser.
xml_set_object($this->parser, $this);
xml_set_object($this->parser, $this);
// Set the element handlers for the parser.
xml_set_element_handler($this->parser, 'start_element', 'end_element');
xml_set_character_data_handler($this->parser, 'character_data');
@ -276,7 +276,7 @@ class wsdl extends nusoap_base {
$this->debug("XML payload:\n" . $wsdl_string);
$this->setError($errstr);
return false;
}
}
// free the parser
xml_parser_free($this->parser);
$this->debug('Parsing WSDL done');
@ -285,15 +285,15 @@ class wsdl extends nusoap_base {
return false;
}
return true;
}
}
/**
* start-element handler
*
*
* @param string $parser XML parser object
* @param string $name element name
* @param string $attrs associative array of attributes
* @access private
* @access private
*/
function start_element($parser, $name, $attrs)
{
@ -312,10 +312,10 @@ class wsdl extends nusoap_base {
} else {
// position in the total number of elements, starting from 0
$pos = $this->position++;
$depth = $this->depth++;
$depth = $this->depth++;
// set self as current value for this depth
$this->depth_array[$depth] = $pos;
$this->message[$pos] = array('cdata' => '');
$this->message[$pos] = array('cdata' => '');
// process attributes
if (count($attrs) > 0) {
// register namespace declarations
@ -325,11 +325,11 @@ class wsdl extends nusoap_base {
$this->namespaces[$ns_prefix] = $v;
} else {
$this->namespaces['ns' . (count($this->namespaces) + 1)] = $v;
}
}
if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') {
$this->XMLSchemaVersion = $v;
$this->namespaces['xsi'] = $v . '-instance';
}
}
}
}
// expand each attribute prefix to its namespace
@ -337,22 +337,22 @@ class wsdl extends nusoap_base {
$k = strpos($k, ':') ? $this->expandQname($k) : $k;
if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') {
$v = strpos($v, ':') ? $this->expandQname($v) : $v;
}
}
$eAttrs[$k] = $v;
}
}
$attrs = $eAttrs;
} else {
$attrs = array();
}
}
// get element prefix, namespace and name
if (preg_match('/:/', $name)) {
// get ns prefix
$prefix = substr($name, 0, strpos($name, ':'));
$prefix = substr($name, 0, strpos($name, ':'));
// get ns
$namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : '';
$namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : '';
// get unqualified name
$name = substr(strstr($name, ':'), 1);
}
}
// process attributes, expanding any prefixes to namespaces
// find status, register data
switch ($this->status) {
@ -361,12 +361,12 @@ class wsdl extends nusoap_base {
if (isset($attrs['type'])) {
$this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs));
$this->messages[$this->currentMessage][$attrs['name']] = $attrs['type'];
}
}
if (isset($attrs['element'])) {
$this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs));
$this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^';
}
}
}
}
break;
case 'portType':
switch ($name) {
@ -375,25 +375,25 @@ class wsdl extends nusoap_base {
$this->debug("portType $this->currentPortType operation: $this->currentPortOperation");
if (isset($attrs['parameterOrder'])) {
$this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder'];
}
}
break;
case 'documentation':
$this->documentation = true;
break;
break;
// merge input/output data
default:
$m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : '';
$this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m;
break;
}
}
break;
case 'binding':
switch ($name) {
case 'binding':
case 'binding':
// get ns prefix
if (isset($attrs['style'])) {
$this->bindings[$this->currentBinding]['prefix'] = $prefix;
}
}
$this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs);
break;
case 'header':
@ -402,17 +402,17 @@ class wsdl extends nusoap_base {
case 'operation':
if (isset($attrs['soapAction'])) {
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction'];
}
}
if (isset($attrs['style'])) {
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style'];
}
}
if (isset($attrs['name'])) {
$this->currentOperation = $attrs['name'];
$this->debug("current binding operation: $this->currentOperation");
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name'];
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding;
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : '';
}
}
break;
case 'input':
$this->opStatus = 'input';
@ -425,9 +425,9 @@ class wsdl extends nusoap_base {
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs);
} else {
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs;
}
}
break;
}
}
break;
case 'service':
switch ($name) {
@ -435,7 +435,7 @@ class wsdl extends nusoap_base {
$this->currentPort = $attrs['name'];
$this->debug('current port: ' . $this->currentPort);
$this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']);
break;
case 'address':
$this->ports[$this->currentPort]['location'] = $attrs['location'];
@ -443,9 +443,9 @@ class wsdl extends nusoap_base {
$this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace;
$this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location'];
break;
}
}
break;
}
}
// set status
switch ($name) {
case 'import':
@ -481,11 +481,11 @@ class wsdl extends nusoap_base {
$this->currentBinding = $this->getLocalPart($attrs['name']);
} else {
$this->currentBinding = $attrs['name'];
}
}
$this->status = 'binding';
$this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']);
$this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']);
}
}
break;
case 'service':
$this->serviceName = $attrs['name'];
@ -495,20 +495,20 @@ class wsdl extends nusoap_base {
case 'definitions':
foreach ($attrs as $name => $value) {
$this->wsdl_info[$name] = $value;
}
}
break;
}
}
}
}
}
}
/**
* end-element handler
*
*
* @param string $parser XML parser object
* @param string $name element name
* @access private
* @access private
*/
function end_element($parser, $name){
function end_element($parser, $name){
// unset schema status
if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) {
$this->status = "";
@ -516,38 +516,38 @@ class wsdl extends nusoap_base {
$this->currentSchema->clearDebug();
$this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema;
$this->debug('Parsing WSDL schema done');
}
}
if ($this->status == 'schema') {
$this->currentSchema->schemaEndElement($parser, $name);
} else {
// bring depth down a notch
$this->depth--;
}
}
// end documentation
if ($this->documentation) {
//TODO: track the node to which documentation should be assigned; it can be a part, message, etc.
//$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation;
$this->documentation = false;
}
}
}
}
/**
* element content handler
*
*
* @param string $parser XML parser object
* @param string $data element content
* @access private
* @access private
*/
function character_data($parser, $data)
{
$pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0;
if (isset($this->message[$pos]['cdata'])) {
$this->message[$pos]['cdata'] .= $data;
}
}
if ($this->documentation) {
$this->documentation .= $data;
}
}
}
}
/**
* if authenticating, set user credentials here
@ -566,21 +566,21 @@ class wsdl extends nusoap_base {
$this->authtype = $authtype;
$this->certRequest = $certRequest;
}
function getBindingData($binding)
{
if (is_array($this->bindings[$binding])) {
return $this->bindings[$binding];
}
}
}
/**
* returns an assoc array of operation names => operation data
*
*
* @param string $portName WSDL port name
* @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported)
* @return array
* @access public
* @return array
* @access public
*/
function getOperations($portName = '', $bindingType = 'soap') {
$ops = array();
@ -612,15 +612,15 @@ class wsdl extends nusoap_base {
$this->debug("getOperations found no operations for port '$portName' bindingType $bindingType");
}
return $ops;
}
}
/**
* returns an associative array of data necessary for calling an operation
*
*
* @param string $operation name of operation
* @param string $bindingType type of binding eg: soap, soap12
* @return array
* @access public
* @return array
* @access public
*/
function getOperationData($operation, $bindingType = 'soap')
{
@ -640,19 +640,19 @@ class wsdl extends nusoap_base {
if ($operation == $bOperation) {
$opData = $this->bindings[ $portData['binding'] ]['operations'][$operation];
return $opData;
}
}
}
}
}
}
}
}
/**
* returns an associative array of data necessary for calling an operation
*
*
* @param string $soapAction soapAction for operation
* @param string $bindingType type of binding eg: soap, soap12
* @return array
* @access public
* @return array
* @access public
*/
function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') {
if ($bindingType == 'soap') {
@ -668,12 +668,12 @@ class wsdl extends nusoap_base {
foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
if ($opData['soapAction'] == $soapAction) {
return $opData;
}
}
}
}
}
}
}
}
/**
* returns an array of information about a given type
* returns false if no type exists by the given name
@ -884,7 +884,7 @@ class wsdl extends nusoap_base {
*
* @param mixed $debug whether to put debug=1 in endpoint URL
* @return string serialization of WSDL
* @access public
* @access public
*/
function serialize($debug = 0)
{
@ -892,15 +892,15 @@ class wsdl extends nusoap_base {
$xml .= "\n<definitions";
foreach($this->namespaces as $k => $v) {
$xml .= " xmlns:$k=\"$v\"";
}
}
// 10.9.02 - add poulter fix for wsdl and tns declarations
if (isset($this->namespaces['wsdl'])) {
$xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\"";
}
}
if (isset($this->namespaces['tns'])) {
$xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\"";
}
$xml .= '>';
}
$xml .= '>';
// imports
if (sizeof($this->import) > 0) {
foreach($this->import as $ns => $list) {
@ -911,8 +911,8 @@ class wsdl extends nusoap_base {
$xml .= '<import namespace="' . $ns . '" />';
}
}
}
}
}
}
// types
if (count($this->schemas)>=1) {
$xml .= "\n<types>\n";
@ -922,7 +922,7 @@ class wsdl extends nusoap_base {
}
}
$xml .= '</types>';
}
}
// messages
if (count($this->messages) >= 1) {
foreach($this->messages as $msgName => $msgParts) {
@ -939,11 +939,11 @@ class wsdl extends nusoap_base {
foreach($this->typemap as $ns => $types) {
if (isset($types[$partType])) {
$typePrefix = $this->getPrefixFromNamespace($ns);
}
}
}
}
if (!isset($typePrefix)) {
die("$partType has no namespace!");
}
}
}
$ns = $this->getNamespaceFromPrefix($typePrefix);
$localPart = $this->getLocalPart($partType);
@ -960,8 +960,8 @@ class wsdl extends nusoap_base {
}
}
$xml .= '</message>';
}
}
}
}
// bindings & porttypes
if (count($this->bindings) >= 1) {
$binding_xml = '';
@ -989,7 +989,7 @@ class wsdl extends nusoap_base {
$portType_xml .= "\n" . ' <operation name="' . $opParts['name'] . '"';
if (isset($opParts['parameterOrder'])) {
$portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"';
}
}
$portType_xml .= '>';
if(isset($opParts['documentation']) && $opParts['documentation'] != '') {
$portType_xml .= "\n" . ' <documentation>' . htmlspecialchars($opParts['documentation']) . '</documentation>';
@ -997,12 +997,12 @@ class wsdl extends nusoap_base {
$portType_xml .= "\n" . ' <input message="tns:' . $opParts['input']['message'] . '"/>';
$portType_xml .= "\n" . ' <output message="tns:' . $opParts['output']['message'] . '"/>';
$portType_xml .= "\n" . ' </operation>';
}
}
$portType_xml .= "\n" . '</portType>';
$binding_xml .= "\n" . '</binding>';
}
}
$xml .= $portType_xml . $binding_xml;
}
}
// services
$xml .= "\n<service name=\"" . $this->serviceName . '">';
if (count($this->ports) >= 1) {
@ -1010,11 +1010,11 @@ class wsdl extends nusoap_base {
$xml .= "\n" . ' <port name="' . $pName . '" binding="tns:' . $attrs['binding'] . '">';
$xml .= "\n" . ' <soap:address location="' . $attrs['location'] . ($debug ? '?debug=1' : '') . '"/>';
$xml .= "\n" . ' </port>';
}
}
}
}
$xml .= "\n" . '</service>';
return $xml . "\n</definitions>";
}
}
/**
* determine whether a set of parameters are unwrapped
@ -1059,7 +1059,7 @@ class wsdl extends nusoap_base {
$phpType = $typeDef['phpType'];
$arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '');
$this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType");
// we expect a complexType or element of complexType
if ($phpType != 'struct') {
$this->debug("in parametersMatchWrapped: not a struct");
@ -1100,7 +1100,7 @@ class wsdl extends nusoap_base {
* TODO
* - multi-ref serialization
* - validate PHP values against type definitions, return errors if invalid
*
*
* @param string $operation operation name
* @param string $direction (input|output)
* @param mixed $parameters parameter value(s)
@ -1111,12 +1111,12 @@ class wsdl extends nusoap_base {
function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') {
$this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType");
$this->appendDebug('parameters=' . $this->varDump($parameters));
if ($direction != 'input' && $direction != 'output') {
$this->debug('The value of the \$direction argument needs to be either "input" or "output"');
$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
return false;
}
}
if (!$opData = $this->getOperationData($operation, $bindingType)) {
$this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType);
$this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType);
@ -1167,7 +1167,7 @@ class wsdl extends nusoap_base {
$this->debug("serializing part $name of type $type");
// Track encoding style
if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
$encodingStyle = $opData[$direction]['encodingStyle'];
$encodingStyle = $opData[$direction]['encodingStyle'];
$enc_style = $encodingStyle;
} else {
$enc_style = false;
@ -1193,15 +1193,15 @@ class wsdl extends nusoap_base {
}
$this->debug("serializeRPCParameters returning: $xml");
return $xml;
}
}
/**
* serialize a PHP value according to a WSDL message definition
*
*
* TODO
* - multi-ref serialization
* - validate PHP values against type definitions, return errors if invalid
*
*
* @param string $operation operation name
* @param string $direction (input|output)
* @param mixed $parameters parameter value(s)
@ -1211,14 +1211,14 @@ class wsdl extends nusoap_base {
*/
function serializeParameters($operation, $direction, $parameters)
{
$this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion");
$this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion");
$this->appendDebug('parameters=' . $this->varDump($parameters));
if ($direction != 'input' && $direction != 'output') {
$this->debug('The value of the \$direction argument needs to be either "input" or "output"');
$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
return false;
}
}
if (!$opData = $this->getOperationData($operation)) {
$this->debug('Unable to retrieve WSDL data for operation: ' . $operation);
$this->setError('Unable to retrieve WSDL data for operation: ' . $operation);
@ -1226,18 +1226,18 @@ class wsdl extends nusoap_base {
}
$this->debug('opData:');
$this->appendDebug($this->varDump($opData));
// Get encoding style for output and set to current
$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) {
$encodingStyle = $opData['output']['encodingStyle'];
$enc_style = $encodingStyle;
}
// set input params
$xml = '';
if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) {
$use = $opData[$direction]['use'];
$this->debug("use=$use");
$this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)');
@ -1248,7 +1248,7 @@ class wsdl extends nusoap_base {
$this->debug('serializing part "'.$name.'" of type "'.$type.'"');
// Track encoding style
if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
$encodingStyle = $opData[$direction]['encodingStyle'];
$encodingStyle = $opData[$direction]['encodingStyle'];
$enc_style = $encodingStyle;
} else {
$enc_style = false;
@ -1274,11 +1274,11 @@ class wsdl extends nusoap_base {
}
$this->debug("serializeParameters returning: $xml");
return $xml;
}
}
/**
* serializes a PHP value according a given type definition
*
*
* @param string $name name of value (part or element)
* @param string $type XML schema type of value (type or element)
* @param mixed $value a native PHP value (parameter value)
@ -1364,7 +1364,7 @@ class wsdl extends nusoap_base {
} else {
$value = 'true';
}
}
}
if ($uqType == 'string' && gettype($value) == 'string') {
$value = $this->expandEntities($value);
}
@ -1445,7 +1445,7 @@ class wsdl extends nusoap_base {
return false;
}
$phpType = $typeDef['phpType'];
$this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') );
$this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') );
// if php type == struct, map value to the <all> element names
if ($phpType == 'struct') {
if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') {
@ -1537,11 +1537,11 @@ class wsdl extends nusoap_base {
foreach($value as $v) {
$cols = ',' . sizeof($v);
$nv = array_merge($nv, $v);
}
}
$value = $nv;
} else {
$cols = '';
}
}
if (is_array($value) && sizeof($value) >= 1) {
$rows = sizeof($value);
$contents = '';
@ -1552,7 +1552,7 @@ class wsdl extends nusoap_base {
$contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use);
} else {
$contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use);
}
}
}
} else {
$rows = 0;
@ -1596,7 +1596,7 @@ class wsdl extends nusoap_base {
$this->debug("in serializeType: returning: $xml");
return $xml;
}
/**
* serializes the attributes for a complexType
*
@ -1651,7 +1651,7 @@ class wsdl extends nusoap_base {
if ($xname) {
$xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\"";
}
}
}
} else {
$this->debug("no attributes to serialize for XML Schema type $ns:$uqType");
}
@ -1709,7 +1709,7 @@ class wsdl extends nusoap_base {
}
// if user took advantage of a minOccurs=0, then only serialize named parameters
if (isset($optionals)
&& (!isset($xvalue[$eName]))
&& (!isset($xvalue[$eName]))
&& ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true')
){
if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') {
@ -1757,7 +1757,7 @@ class wsdl extends nusoap_base {
}
}
}
}
}
} else {
$this->debug("no elements to serialize for XML Schema type $ns:$uqType");
}
@ -1793,7 +1793,7 @@ class wsdl extends nusoap_base {
}
$elements = $eElements;
}
if (count($attrs) > 0) {
foreach($attrs as $n => $a){
// expand each attribute
@ -1846,7 +1846,7 @@ class wsdl extends nusoap_base {
/**
* register an operation with the server
*
*
* @param string $name operation (method) name
* @param array $in assoc array of input values: key = param name, value = param type
* @param array $out assoc array of output values: key = param name, value = param type
@ -1856,7 +1856,7 @@ class wsdl extends nusoap_base {
* @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now)
* @param string $documentation optional The description to include in the WSDL
* @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
* @access public
* @access public
*/
function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){
if ($use == 'encoded' && $encodingStyle == '') {
@ -1903,7 +1903,7 @@ class wsdl extends nusoap_base {
'parts' => $out),
'namespace' => $namespace,
'transport' => 'http://schemas.xmlsoap.org/soap/http',
'documentation' => $documentation);
'documentation' => $documentation);
// add portTypes
// add messages
if($in)
@ -1931,7 +1931,7 @@ class wsdl extends nusoap_base {
$this->messages[$name.'Response']= '0';
}
return true;
}
}
}
?>

View File

@ -9,10 +9,10 @@ nusoap-general@lists.sourceforge.net
/**
* caches instances of the wsdl class
*
*
* @author Scott Nichol <snichol@users.sourceforge.net>
* @author Ingo Fischer <ingo@apollon.de>
* @access public
* @access public
*/
class nusoap_wsdlcache {
/**
@ -43,7 +43,7 @@ class nusoap_wsdlcache {
* @param integer $cache_lifetime lifetime for caching-files in seconds or 0 for unlimited
* @access public
*/
function nusoap_wsdlcache($cache_dir='.', $cache_lifetime=0) {
function __construct($cache_dir='.', $cache_lifetime=0) {
$this->fplock = array();
$this->cache_dir = $cache_dir != '' ? $cache_dir : '.';
$this->cache_lifetime = $cache_lifetime;

View File

@ -12,7 +12,7 @@
* @access public
*/
class nusoap_xmlschema extends nusoap_base {
// files
var $schema = '';
var $xml = '';
@ -41,7 +41,7 @@ class nusoap_xmlschema extends nusoap_base {
var $depth_array = array();
var $message = array();
var $defaultNamespace = array();
/**
* constructor
*
@ -50,8 +50,8 @@ class nusoap_xmlschema extends nusoap_base {
* @param string $namespaces namespaces defined in enclosing XML
* @access public
*/
function nusoap_xmlschema($schema='',$xml='',$namespaces=array()){
parent::nusoap_base();
function __construct($schema='',$xml='',$namespaces=array()){
parent::__construct();
$this->debug('nusoap_xmlschema class instantiated, inside constructor');
// files
$this->schema = $schema;
@ -141,7 +141,7 @@ class nusoap_xmlschema extends nusoap_base {
$this->debug("XML payload:\n" . $xml);
$this->setError($errstr);
}
xml_parser_free($this->parser);
} else{
$this->debug('no xml passed to parseString()!!');
@ -163,7 +163,7 @@ class nusoap_xmlschema extends nusoap_base {
}
return $scope . $ename . '_ContainedType';
}
/**
* start-element handler
*
@ -173,13 +173,13 @@ class nusoap_xmlschema extends nusoap_base {
* @access private
*/
function schemaStartElement($parser, $name, $attrs) {
// position in the total number of elements, starting from 0
$pos = $this->position++;
$depth = $this->depth++;
// set self as current value for this depth
$this->depth_array[$depth] = $pos;
$this->message[$pos] = array('cdata' => '');
$this->message[$pos] = array('cdata' => '');
if ($depth > 0) {
$this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]];
} else {
@ -193,7 +193,7 @@ class nusoap_xmlschema extends nusoap_base {
} else {
$prefix = '';
}
// loop thru attributes, expanding, and registering namespace declarations
if(count($attrs) > 0){
foreach($attrs as $k => $v){
@ -269,7 +269,7 @@ class nusoap_xmlschema extends nusoap_base {
$aname = $attrs['ref'];
$this->attributes[$attrs['ref']] = $attrs;
}
if($this->currentComplexType){ // This should *always* be
$this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs;
}
@ -562,8 +562,8 @@ class nusoap_xmlschema extends nusoap_base {
$xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n";
}
}
}
}
}
}
// complex types
foreach($this->complexTypes as $typeName => $attrs){
$contentStr = '';
@ -860,12 +860,12 @@ class nusoap_xmlschema extends nusoap_base {
}
return $buffer;
}
/**
* adds a complex type to the schema
*
*
* example: array
*
*
* addType(
* 'ArrayOfstring',
* 'complexType',
@ -875,9 +875,9 @@ class nusoap_xmlschema extends nusoap_base {
* array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'),
* 'xsd:string'
* );
*
*
* example: PHP associative array ( SOAP Struct )
*
*
* addType(
* 'SOAPStruct',
* 'complexType',
@ -885,7 +885,7 @@ class nusoap_xmlschema extends nusoap_base {
* 'all',
* array('myVar'=> array('name'=>'myVar','type'=>'string')
* );
*
*
* @param name
* @param typeClass (complexType|simpleType|attribute)
* @param phpType: currently supported are array and struct (php assoc array)
@ -913,11 +913,11 @@ class nusoap_xmlschema extends nusoap_base {
'attrs' => $attrs,
'arrayType' => $arrayType
);
$this->xdebug("addComplexType $name:");
$this->appendDebug($this->varDump($this->complexTypes[$name]));
}
/**
* adds a simple type to the schema
*
@ -938,7 +938,7 @@ class nusoap_xmlschema extends nusoap_base {
'type' => $restrictionBase,
'enumeration' => $enumeration
);
$this->xdebug("addSimpleType $name:");
$this->appendDebug($this->varDump($this->simpleTypes[$name]));
}
@ -956,7 +956,7 @@ class nusoap_xmlschema extends nusoap_base {
}
$this->elements[ $attrs['name'] ] = $attrs;
$this->elements[ $attrs['name'] ]['typeClass'] = 'element';
$this->xdebug("addElement " . $attrs['name']);
$this->appendDebug($this->varDump($this->elements[ $attrs['name'] ]));
}

View File

@ -219,7 +219,7 @@ class nusoap_base {
*
* @access public
*/
function nusoap_base() {
function __construct() {
$this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'];
}
@ -1037,8 +1037,8 @@ class nusoap_fault extends nusoap_base {
* @param string $faultstring human readable error message
* @param mixed $faultdetail detail, typically a string or array of string
*/
function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
parent::nusoap_base();
function __construct($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
parent::__construct();
$this->faultcode = $faultcode;
$this->faultactor = $faultactor;
$this->faultstring = $faultstring;
@ -1129,8 +1129,8 @@ class nusoap_xmlschema extends nusoap_base {
* @param string $namespaces namespaces defined in enclosing XML
* @access public
*/
function nusoap_xmlschema($schema='',$xml='',$namespaces=array()){
parent::nusoap_base();
function __construct($schema='',$xml='',$namespaces=array()){
parent::__construct();
$this->debug('nusoap_xmlschema class instantiated, inside constructor');
// files
$this->schema = $schema;
@ -2116,8 +2116,8 @@ class soapval extends nusoap_base {
* @param mixed $attributes associative array of attributes to add to element serialization
* @access public
*/
function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) {
parent::nusoap_base();
function __construct($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) {
parent::__construct();
$this->name = $name;
$this->type = $type;
$this->value = $value;
@ -2207,8 +2207,8 @@ class soap_transport_http extends nusoap_base {
* @param boolean $use_curl Whether to try to force cURL use
* @access public
*/
function soap_transport_http($url, $curl_options = NULL, $use_curl = false){
parent::nusoap_base();
function __construct($url, $curl_options = NULL, $use_curl = false){
parent::__construct();
$this->debug("ctor url=$url use_curl=$use_curl curl_options:");
$this->appendDebug($this->varDump($curl_options));
$this->setURL($url);
@ -3623,8 +3623,8 @@ class nusoap_server extends nusoap_base {
* @param mixed $wsdl file path or URL (string), or wsdl instance (object)
* @access public
*/
function nusoap_server($wsdl=false){
parent::nusoap_base();
function __construct($wsdl=false) {
parent::__construct();
// turn on debugging?
global $debug;
global $HTTP_SERVER_VARS;
@ -4645,8 +4645,8 @@ class wsdl extends nusoap_base {
* @param boolean $use_curl try to use cURL
* @access public
*/
function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){
parent::nusoap_base();
function __construct($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){
parent::__construct();
$this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout");
$this->proxyhost = $proxyhost;
$this->proxyport = $proxyport;
@ -6572,8 +6572,8 @@ class nusoap_parser extends nusoap_base {
* @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1
* @access public
*/
function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
parent::nusoap_base();
function __construct($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
parent::__construct();
$this->xml = $xml;
$this->xml_encoding = $encoding;
$this->method = $method;
@ -7249,8 +7249,8 @@ class nusoap_client extends nusoap_base {
* @param string $portName optional portName in WSDL document
* @access public
*/
function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
parent::nusoap_base();
function __construct($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
parent::__construct();
$this->endpoint = $endpoint;
$this->proxyhost = $proxyhost;
$this->proxyport = $proxyport;

View File

@ -1034,7 +1034,7 @@ if (!defined('NOLOGIN'))
$user->getrights();
}
dol_syslog("--- Access to ".$_SERVER["REQUEST_METHOD"].' '.$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').' NOTOKENRENEWAL='.(defined('NOTOKENRENEWAL') ?constant('NOTOKENRENEWAL') : ''));
dol_syslog("--- Access to ".(empty($_SERVER["REQUEST_METHOD"])?'':$_SERVER["REQUEST_METHOD"].' ').$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09').' NOTOKENRENEWAL='.(defined('NOTOKENRENEWAL') ?constant('NOTOKENRENEWAL') : ''));
//Another call for easy debugg
//dol_syslog("Access to ".$_SERVER["PHP_SELF"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST));

View File

@ -183,7 +183,7 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals('OK', $result['result']['result_code']);
return $result;

View File

@ -188,7 +188,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals('OK', $result['result']['result_code']);
// Test method that does not exists
@ -212,7 +212,7 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals("SOAP-ENV:Client: Operation 'methodthatdoesnotexists' is not defined in the WSDL for this service", $soapclient->error_str);
return $result;

View File

@ -202,7 +202,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals('OK', $result['result']['result_code']);
return $result['id'];
@ -265,7 +265,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals('OK', $result['result']['result_code']);
return $id;
@ -328,7 +328,7 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals('OK', $result['result']['result_code']);
return 0;

View File

@ -148,13 +148,15 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase
$ns='http://www.dolibarr.org/ns/';
// Set the WebService URL
print __METHOD__."Create nusoap_client for URL=".$WS_DOL_URL."\n";
print __METHOD__." Create nusoap_client for URL=".$WS_DOL_URL."\n";
$soapclient = new nusoap_client($WS_DOL_URL);
if ($soapclient) {
$soapclient->soap_defencoding='UTF-8';
$soapclient->decodeUTF8(false);
}
//$soapclient->setDebugLevel(5);
// Call the WebService method and store its result in $result.
$authentication=array(
'dolibarrkey'=>$conf->global->WEBSERVICES_KEY,
@ -167,7 +169,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase
// Test URL
$result='';
$parameters = array('authentication'=>$authentication,'id'=>0,'ref'=>'admin');
print __METHOD__."Call method ".$WS_METHOD."\n";
print __METHOD__." Call method ".$WS_METHOD."\n";
try {
$result = $soapclient->call($WS_METHOD, $parameters, $ns, '');
} catch (SoapFault $exception) {
@ -188,8 +190,8 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
$this->assertEquals('OK', $result['result']['result_code'], 'Test on ref admin');
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals('OK', empty($result['result']['result_code'])?'':$result['result']['result_code'], 'Test on ref admin');
// Test URL
$result='';
@ -211,7 +213,7 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase
print "\n";
}
print __METHOD__." result=".$result."\n";
print __METHOD__." count(result)=".count($result)."\n";
$this->assertEquals('NOT_FOUND', $result['result']['result_code'], 'Test on ref that does not exists');
return $result;