Unable to Subscribe to a topic

12 views
Skip to first unread message

Vade

unread,
Aug 13, 2010, 7:04:00 AM8/13/10
to phpsam
Hi,

I'm using phpsam on Windows XP with Apache, PHP 5.1.6, WebSphere MQ
client v7, IBM Message Service Client for C/C++ and I obtained the
phpsam dll from the following link:

http://project-sam.awardspace.com/downloads.htm

I managed to connect, put, get and publish messages to WebSphere MQ v7
on another server but I can't seem to get the subscribe code working.
Here's the code I am using for the subscribe:

<?php
$queuename = "topic://TOPICSTRING";
if ($conn) {
$sub = $conn->subscribe($queuename);
if ($sub) {
echo '<font color="green"><b>OK</b></font> subscribe suceeded
sub id='.$sub.'<br>';
} else {
echo '<font color="red"><b>FAILED</b></font> Subscribe failed
with errno='.$conn->errno.' '.$conn->error.'<br>';
}
} else {
echo '<font color="red"><b>FAILED</b></font> previous connection
create test failed!';
}
?>

Here's the output of the php script when run on the browser (with
setdebug set to true):

-->SAMConnection.Subscribe(topic://TOPICSTRING)
SAMConnection.Subscribe() subscribe failed (211) Unable to create XMS
consumer!
<--SAMConnection.Subscribe() rc=
FAILED Subscribe failed with errno=211 Unable to create XMS consumer!

Please help. Thanks.


Best regards,

Dave
Reply all
Reply to author
Forward
0 new messages