Due to a firewall audit, requests must always have the "UserAgent" and "Accept" header.
I tried this:
$soapclient = new soapclient('http://www.soap.com/soap.php?wsdl',
array('stream_context' => stream_context_create(
array(
'http'=> array(
'user_agent' => 'PHP/SOAP',
'accept' => 'application/xml')
)
)
)
);
the request received by the server soap
GET /soap.php?wsdl HTTP/1.1
Host: www.soap.com
User-Agent: PHP/SOAP
Connection: close
the expected result
GET /soap.php?wsdl HTTP/1.1
Host: www.soap.com
Accept application/xml
User-Agent: PHP/SOAP
Connection: close
Why "Accept" has not been sent? "User-Agent" works!