title: Laravel SOAP Server & Client: Method not allowed
body: <p>I try to setup a SOAP Server for Laravel Framework 5.5.13. Therefore I have created two classes (Server.php and Client.php) and two Controllers, SoapServerController and SoapClientController.</p>
  
  <p>Here's the source code:</p>
  
  <p>app/Classes/Soap/Server.php
  
  
  <pre><code>namespace App\Classes\Soap;
  
  class Server {
      public function __construct() {
      }
  
      public function getDate() {
          return date('Y-m-d');
      }
  
  }
  </code></pre>
  
  <p>app/Classes/Soap/Client.php
  
  
  <pre><code>namespace App\Classes\Soap;
  
  class Client {
  
      protected $instance;
  
      public function __construct() {
          $params = array( 'uri' =&gt; '/soap/server',
                           'location' =&gt; url('/soap/server'),
                           'trace' =&gt; 1,
                           'soap_version' =&gt; SOAP_1_2
                           );
  
          $this-&gt;instance = new \SoapClient( null, $params );
  
      }
  
      public function getDate() {
          return $this-&gt;instance-&gt;getDate();
      }
  
  }
  </code></pre>
  
  <p>app/Http/Controllers/SoapServerController.php</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Classes\Soap;
  
  class SoapServerController extends Controller
  {
      public function index() {
          $params = array( 'uri' =&gt; url('/soap/server') );
          $server = new \SoapServer( null, $params );
          $server-&gt;setClass( Soap\Server::class );
          $server-&gt;handle();
      }
  
  }
  </code></pre>
  
  <p>app/Http/Controllers/SoapClientController.php</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Classes\Soap;
  
  class SoapClientController extends Controller
  {
      public function index() {
          $client = new Soap\Client;
          $client-&gt;getDate();
      }
  }
  </code></pre>
  
  <p>When I open the route /api/soap/client, I get the error:</p>
  
  <blockquote>
    <p>SoapFault: Method Not Allowed</p>
  </blockquote>
  
  <p>Do I have to change something in my routes file?</p>