Jump to content

PHP Soap - Consuming Web Service problems


harby

Recommended Posts

Hi,

This is the first time I have used PHP with SOAP as we have just upgraded our server to PHP5.

I am trying to call the readChallenge method by consuming the PlayStream Web service.

Here is the code I am using:

// Define test vars
$_POST['challenge'] = 'test 1';
define('P_GUID', 'test 2');

$client = new SoapClient( "http://www.playstream.com/license/DRMLicense.asmx?wsdl", array('trace'=>1) );

echo 'Dumping client object:';
echo "<pre>";
var_dump($client);
echo "</pre>";

echo 'Dumping client object functions:';
echo "<pre>";
var_dump($client->__getFunctions());
echo "</pre>";

$readChallenge = $client->__soapCall( "readChallenge", array('null', $_POST['challenge'], P_GUID) );

echo '<pre>';
var_dump($readChallenge);
echo '</pre>';

// Debugging echo "<hr><pre>\n";
echo "Request Headers:\n". htmlspecialchars($client->__getLastRequestHeaders()) ."\n";
echo "Request:\n". htmlspecialchars($client->__getLastRequest()) ."\n";
echo "Response Headers:\n". htmlspecialchars($client->__getLastResponseHeaders()) ."\n";
echo "Response:\n". htmlspecialchars($client->__getLastResponse())."\n";
echo "</pre>";

This gives no response apart from an empty array, any ideas what I am doing wrong?
Any help or ideas would be much appreciated.

Many thanks.

Resources:
https://www.playstream.com/license/D...=readChallenge
http://www.playstream.com/license/DRMLicense.asmx?wsdl
http://www.playstream.com/support/dr..._custom.aspx#4
Link to comment
https://forums.phpfreaks.com/topic/34538-php-soap-consuming-web-service-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.