Hi, sorry to hear you are having problems.
The Fatal error you are seeing looks odd: the _ms_ in the middle of
the name looks like something somewhere is looking for a
binding.ms
rather than binding.message. I propose we try with an exaple that I
know works - I show below a simple example that I have just tried out
on my machine with ActiveMQ 5.0. I am running with the FULMAR branch
of SCA but I don't think that should make any difference.
As for the second error you report, the empty line, one reason for
that can be a blank line in the php script on the receiving end - the
one that is supposed to generate the wsdl. If there is a blank line
before the first <?php, it comes out in the wsdl. In fact if any of
the scripts that are involved in generating the wsdl emit anything
before the <?xml declaration we get trouble - but I hope that the SCA
scripts never do that.
Here is my working example. See if it works for you. It's three files
which for me are all in C:\Program Files\Apache Group\Apache2\htdocs
\Frankfurt\Message
where htdocs is of course the document root for my apache.
Of course you need to start ActiveMQ in one window and
ReceivingService.php in another. You'll see that the test client gets
the receiving service to generate the msd file and writes it out, then
makes a local call to the sending service which sends the magic
initials IBM on queue://receiver
I get a couple of annoying messages from the SAM extension but that is
because I run php with strict messages i.e. show all errors - in any
case they are nothing to worry about.
Good luck and do let me know how you get on.
Matthew
TestClient.php
____________________________________________________________________________________
<?php
include_once "SCA/SCA.php";
$msd = file_get_contents('
http://localhost/Frankfurt/Message/
ReceivingService.php?msd');
file_put_contents('./ReceivingService.msd', $msd);
$local_service = SCA::getService('./SendingService.php');
$local_service->send('IBM') . "\n";
?>
______________________________________________________________________________________
SendingService.php
______________________________________________________________________________________
<?php
include "SCA/SCA.php";
/**
* @service
*/
class SendingService {
/**
* @reference
* @binding.message ReceivingService.msd
*/
public $receiving_service;
public function send($str)
{
$this->receiving_service->send($str);
}
}
?>
______________________________________________________________________________________
ReceivingService.php
______________________________________________________________________________________
<?php
include "SCA/SCA.php";
/**
* @service
* @binding.message
* @protocol stomp
* @destination queue://receiver
* @wsdl disabled
*/
class ReceivingService {
public function send($str) {
echo $str . "\n";
}
}
?>
______________________________________________________________________________________