PHP SoapClient - How to Structure Soap Header
问题 Using SoapClient in PHP 5.3.28 would like to create a soap header that looks like: <soap:Header> <ns:RequestParams Size="Large" Color="Blue" Brand="xyz"> </soap:Header> If I construct the header like this: $params = array('RequestParams' => array('Size' => 'Large', 'Color' => 'Blue', 'Brand' => 'xyz'); $header = new SoapHeader(NameSpace, 'RequestParams', $params); $client = new SoapClient(NULL, array("location" => "https://endpoint-url", "uri" => "http://namespace-uri", "soap_version" => SOAP