I'm implementing a SOAP client with PHP SoapClient.
The wsdl-file specifies URL for a function of type http (like http://api.example.com/a/b).
However, when called, I get a response
HTTP/1.0 301 Moved Permanently
Location: https://api...
Apparently the SoapClient can not handle the redirect.
How can I solve the issue?
$param = array('user' => 'Gopal',
'password' => 'Rathod',
'KeyCode' => 'XYXXYGOPALASDADXXX',
'ExternalID' => 'PUBLICSTORAGE',
'sXml' => $strinXML, 'trace' => TRUE);
$soapClient = new SoapClient('https://wsdlfullUrl.asmx?WSDL', array('trace' => TRUE));
$result = $soapClient->__soapCall('Request', array($param));
echo '<br> 3. Call Request:<br>' . $soapClient->__getLastRequest() ;
echo '<br> 4. RESPONSE:<br>' . $soapClient->__getLastResponse();
More link http://php.net/manual/en/book.soap.php