Does the current Azure SDK for PHP supports Service Bus for Windows Server 1.1? And if it does, how it should be configured in order to successfully connect and post to the bus?
I found that there is an additional parameter in the connection string, that can change the StsEndpoint and I used it to use STS of the Service Bus, but I am receiving <Error><Code>404</Code><Detail>No service is hosted at the specified address..
.
The code I am using:
<?php
echo "Here we go...\n";
require_once 'vendor/autoload.php';
use WindowsAzure\Common\ServicesBuilder;
use WindowsAzure\Common\ServiceException;
use WindowsAzure\ServiceBus\Models\BrokeredMessage;
echo "Create Service Bus REST proxy.\n";
$connectionString = 'Endpoint=sb://myhost.mydomain/myNamespace;StsEndpoint=https://myhost.mydomain:9355/myNamespace;SharedSecretIssuer=theSASName;SharedSecretValue=theSASKey';
$serviceBusRestProxy = ServicesBuilder::getInstance()->createServiceBusService($connectionString);
try {
echo "Create message. \n";
$message = new BrokeredMessage();
$message->setBody("my message");
echo "Send message. \n";
$serviceBusRestProxy->sendQueueMessage("my-queue", $message);
} catch(ServiceException $e) {
$code = $e->getCode();
$error_message = $e->getMessage();
echo $code . ": " . $error_message .";\n";
}
echo "The End! \n";
?>