Support the ongoing development of Laravel.io →
posted 10 years ago
Packages

Hi guys,

Is there anyone tried to implement NuSoap (http://sourceforge.net/projects/nusoap/) with Laravel ?

I try to use it like this but it doesn't work

Route::get('ws/', function(){
    $server = new App\Libraries\soap_server();

    //Define our namespace
    $namespace = "http://localhost:8000/ws";


    //Configure our WSDL
    $server->configureWSDL('OverService',$namespace);
    $server->wsdl->schemaTargetNamespace = $namespace;
    $server->decode_utf8 = true;
    $server->soap_defencoding = "UTF-8";

    // Register our method
    $server->register(
        'sendMessage',
        array('name' => 'xsd:string'),
        array('message' => 'xsd:string'),
        $namespace,
        $namespace,
        'rpc',
        'encoded',
        'sendMessage service'
    );

    function sendMessage($name) {
        return "Hi ".$name;
    }

    $server->service(file_get_contents("php://input"));
});
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

messi89 messi89 Joined 8 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.