schaulet/nusoap

There is no license information available for the latest version (1.7) of this package.

Library to run SoapServer using Nusoap lib.

1.7 2018-01-15 11:39 UTC

This package is not auto-updated.

Last update: 2024-11-13 06:38:20 UTC


README

composer require doc-space/nusoap

Run a SoapServer

<?php
require('vendor/autoload.php');

ini_set("display_error", 'on');
ini_set("soap.wsdl_cache_enabled", "0");
$server = new Nusoap\soapServer();

$server->configureWSDL('foo', "urn:foo");
$server->wsdl->schemaTargetNamespace = "urn:foo";

$server->register(	
                    'classname.funcname', 
                    array( 
                                    'par_1' => 'xsd:integer', 
                                    'par_2'   => 'xsd:string', 
                    ), 
                    array('return' => 'xsd:Array'), 
                    "urn:foo", 
                    "urn:foo#funcname", 'rpc', 'encoded', 'Description foo bar'
                    );


class classname {
    public function funcname($par_1,$par_2) {
        return ['par_1' => $par_1, 'par_2' => $par_2, 'itens' => ['foo','bar']];
    }
}

$server->service(file_get_contents("php://input"));
?>