Метод изменения SoapClient POST / GET - PullRequest
0 голосов
/ 01 апреля 2020

Как изменить метод в SoapClient (GET / POST / PUT)? Я пытаюсь это:

$stream_context_opts = [
        'http' => [
            'method' => 'GET',
            'header' => 'Content-type: text/xml; charset=utf-8;'
        ]
    ];

    $soap_stream_context = stream_context_create($stream_context_opts);
$client = new SoapClient($url,
            [
                'soap_version' => SOAP_1_1,
                'trace' => true,
                'stream_context' => $soap_stream_context,
                'exceptions' => false,
                'cache_wsdl' => WSDL_CACHE_NONE,
                'keep_alive' => true,
                'connection_timeout' => 5000,
                'method'=>'GET'
            ]);

Но действие всегда POST:

POST /EdiWebService/EdiWebService.svc HTTP/1.1 Host: edi.edoc-online.com Connection: Keep-Alive User Agent: PHP-SOAP/7.0.33-0+deb9u7 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://webservice.comarchedi.com/ComarchEdiWebService/SubscriptionGet" Content-Length: 269
...