Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
AsistenteWeb - nuSOAP
Esyst - NuSOAP
=====================

AsistenteWeb/nuSOAP based in NuSphere NuSOAP.
Esyst/nusoap based on NuSphere NuSOAP.

It is a set of PHP classes.
No PHP extensions required!!!
This is a fork of AsistenteWeb/NuSOAP with some bugs fixed, unfortunately my pull requests were not responded to.

See also: https://github.com/Esyst/PHP-Soap for a library that makes NuSoap compatible with the native Soapclient API (drop in replacement).

Create and consume web services based on:
- SOAP 1.1
Expand All @@ -16,12 +17,11 @@ Instalation
``` json
{
"require": {
"asistenteweb/nusoap": "dev-master"

"esyst/nusoap": "0.1.1"
}
}
```
To actually install AsistenteWeb/nuSOAP in your project, download the composer binary and run it:
To actually install Esyst/nusoap in your project, download the composer binary and run it:

``` bash
wget http://getcomposer.org/composer.phar
Expand All @@ -34,7 +34,7 @@ php composer.phar install
Use it
------
``` php
use Aw\Nusoap\NusoapClient;
use Esyst\Nusoap\NusoapClient;

$client = new NusoapClient("https://yourserver.org?wsdl", true);
$result = $client->call('method', $variables);
Expand All @@ -56,4 +56,4 @@ TODO
----
- Rewrite Documentation
- Rewrite Samples
- Test
- Test
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"name": "asistenteweb/nusoap",
"name": "esyst/nusoap",
"type": "library",
"description": "PHP5 library for SOAP.",
"keywords": ["SOAP", "nuSOAP", "asistenteweb"],
"homepage": "https://github.com/AsistenteWeb/nuSOAP",
"keywords": ["SOAP", "nuSOAP", "esyst"],
"homepage": "https://github.com/gerben-van-eck/NuSOAP",
"license": "GNU",
"authors": [
{
"name": "Esyst",
"homepage" : "http://www.esyst.nl"
},
{
"name": "Asistente Web",
"homepage": "http://www.asistenteweb.com"
Expand All @@ -24,7 +28,7 @@
},
"autoload": {
"psr-0": {
"Aw\\Nusoap": "src/"
"Esyst\\Nusoap": "src/"
}
}
}
10 changes: 5 additions & 5 deletions src/Aw/Nusoap/NusoapBase.php → src/Esyst/Nusoap/NusoapBase.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;

/*
$Id: class.nusoap_base.php,v 1.56 2015/05/18 20:15:08 snichol Exp $
Expand Down Expand Up @@ -411,7 +411,7 @@ function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=fals
$this->appendDebug('value=' . $this->varDump($val));
$this->appendDebug('attributes=' . $this->varDump($attributes));

if (is_object($val) && get_class($val) == 'Aw\Nusoap\Soapval' && (! $soapval)) {
if (is_object($val) && get_class($val) == 'Esyst\Nusoap\Soapval' && (! $soapval)) {
$this->debug("serialize_val: serialize soapval");
$xml = $val->serialize($use);
$this->appendDebug($val->getDebug());
Expand Down Expand Up @@ -532,7 +532,7 @@ function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=fals
break;
case is_object($val):
$this->debug("serialize_val: serialize object");
if (get_class($val) == 'Aw\Nusoap\Soapval') {
if (get_class($val) == 'Esyst\Nusoap\Soapval') {
$this->debug("serialize_val: serialize soapval object");
$pXml = $val->serialize($use);
$this->appendDebug($val->getDebug());
Expand Down Expand Up @@ -568,7 +568,7 @@ function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=fals
$i = 0;
if(is_array($val) && count($val)> 0){
foreach($val as $v){
if(is_object($v) && get_class($v) == 'Aw\Nusoap\Soapval'){
if(is_object($v) && get_class($v) == 'Esyst\Nusoap\Soapval'){
$tt_ns = $v->type_ns;
$tt = $v->type;
} elseif (is_array($v)) {
Expand Down Expand Up @@ -697,7 +697,7 @@ function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc'
if (is_array($headers)) {
$xml = '';
foreach ($headers as $k => $v) {
if (is_object($v) && get_class($v) == 'Aw\Nusoap\Soapval') {
if (is_object($v) && get_class($v) == 'Esyst\Nusoap\Soapval') {
$xml .= $this->serialize_val($v, false, false, false, false, false, $use);
} else {
$xml .= $this->serialize_val($v, $k, false, false, false, false, $use);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;
/**
*
* [nu]soapclient higher level class for easy usage.
Expand Down Expand Up @@ -109,7 +109,7 @@ function __construct($endpoint,$wsdl = false,$proxyhost = false,$proxyport = fal

// make values
if($wsdl){
if (is_object($endpoint) && (get_class($endpoint) == 'Aw\Nusoa\Wsdl')) {
if (is_object($endpoint) && (get_class($endpoint) == 'Esyst\Nusoap\Wsdl')) {
$this->wsdl = $endpoint;
$this->endpoint = $this->wsdl->wsdl;
$this->wsdlFile = $this->endpoint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;
/*
$Id: nusoapmime.php,v 1.13 2015/05/18 20:15:08 snichol Exp $

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;
/**
* Contains information for a SOAP fault.
* Mainly used for returning faults from deployed functions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;



Expand Down Expand Up @@ -117,7 +117,11 @@ function __construct($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
$this->appendDebug($this->varDump($this->message));
$this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name);
// get final value
$this->soapresponse = $this->message[$this->root_struct]['result'];
if( isset($this->message[$this->root_struct]['nil']) && $this->message[$this->root_struct]['nil'] ) {
$this->soapresponse = null;
} else {
$this->soapresponse = $this->message[$this->root_struct]['result'];
}
// get header value
if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){
$this->soapheader = $this->message[$this->root_header]['result'];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;
/**
*
* NusoapServer allows the user to create a SOAP server
Expand Down Expand Up @@ -208,7 +208,7 @@ function __construct($wsdl=false){
// wsdl
if($wsdl){
$this->debug("In NusoapServer, WSDL is specified");
if (is_object($wsdl) && (get_class($wsdl) == 'Aw\Nusoap\Wsdl')) {
if (is_object($wsdl) && (get_class($wsdl) == 'Esyst\Nusoap\Wsdl')) {
$this->wsdl = $wsdl;
$this->externalWSDLURL = $this->wsdl->wsdl;
$this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL);
Expand Down Expand Up @@ -648,7 +648,7 @@ function invoke_method() {
function serialize_return() {
$this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI);
// if fault
if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'Aw\Nusoap\NusoapFault'))) {
if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'Esyst\Nusoap\NusoapFault'))) {
$this->debug('got a fault object from method');
$this->fault = $this->methodreturn;
return;
Expand Down Expand Up @@ -1113,4 +1113,4 @@ function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style=
'location'=>$endpoint,
'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/');
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;
/*
The NuSOAP project home is:
http://sourceforge.net/projects/nusoap/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;

/**
* parses an XML Schema, allows access to it's data, other utility methods.
Expand Down Expand Up @@ -969,4 +969,4 @@ class XMLSchema extends NusoapXmlschema {
}


?>
?>
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace Aw\Nusoap;
namespace Esyst\Nusoap;

/**
* Backward compatibility
*/
class SoapServer extends NusoapServer {

}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;



Expand Down
4 changes: 2 additions & 2 deletions src/Aw/Nusoap/Soapval.php → src/Esyst/Nusoap/Soapval.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;



Expand Down Expand Up @@ -105,4 +105,4 @@ function decode(){



?>
?>
6 changes: 3 additions & 3 deletions src/Aw/Nusoap/Wsdl.php → src/Esyst/Nusoap/Wsdl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace Aw\Nusoap;
namespace Esyst\Nusoap;



Expand Down Expand Up @@ -1299,7 +1299,7 @@ function serializeType($name, $type, $value, $use='encoded', $encodingStyle=fals
}

// if a soapval has been supplied, let its type override the WSDL
if (is_object($value) && get_class($value) == 'Aw\Nusoap\Soapval') {
if (is_object($value) && get_class($value) == 'Esyst\Nusoap\Soapval') {
if ($value->type_ns) {
$type = $value->type_ns . ':' . $value->type;
$forceType = true;
Expand Down Expand Up @@ -1936,4 +1936,4 @@ function addOperation($name, $in = false, $out = false, $namespace = false, $soa
}
}

?>
?>
File renamed without changes.
2 changes: 1 addition & 1 deletion src/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @see https://wiki.php.net/rfc/splclassloader#example_implementation
*/
spl_autoload_register(function($className) {
$package = 'Aw\\Nusoap';
$package = 'Esyst\\Nusoap';
$className = ltrim($className, '\\');
if (0 === strpos($className, $package)) {
$fileName = __DIR__ . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php';
Expand Down