On 22/02/07, Simon Laws <[EMAIL PROTECTED]> wrote:

On 2/22/07, Simon Laws <[EMAIL PROTECTED]> wrote:
>
>
>
> On 2/21/07, Pete Robbins <[EMAIL PROTECTED]> wrote:
> >
> > Thanks. The apache mailing list seems sensitive to attachments. The
> > Jira is the right place for it anyway.
> >
> > Cheers,
> >
> > On 21/02/07, Caroline Maynard <[EMAIL PROTECTED] > wrote:
> > > I had attached it to my post, and it appeared to get through OK for
> > me,  but
> > > perhaps not for others.  So I've now raised
> > > https://issues.apache.org/jira/browse/TUSCANY-1133 and attached it
to
> > that.
> > >
> > > On 21/02/07, Simon Laws <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > I can't find the JIRA that you attached the patch to. Can you
point
> > me in
> > > > the right direction?
> > > >
> > >
> > > --
> > > Caroline
> > >
> >
> >
> > --
> > Pete
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > Thanks Caroline
>
OK, the patch improves the situation on windows somewhat so it's checked
in
now. I need to get it out and re-run on linux.

Regards

Simon


I have been working on the PHP Extension on Linux and have got it into a
"working" state but not without some changes in the code from pecl. Here is
what I have done (though this is not yet checked in to svn):

a) I have created a separate build for the extesnion with it's own build.sh.
It can be packaged and released separately from the rest of Tuscany. This is
an experiment to see if this model works and whether we should do this for
other Tuscany Native extensions. I have included PHPCalculator sample with
the extension rather than in the sca/samples.

b) I have simplified the PHPCalcualtor sample. Currently there is no way for
a PHP client to locate and call a Tuscany service as this code in the
PHP_SCA code is not yet written. I have replaced the C++ client to a simple
Python client. This cleans up the build process significantly! Next I have
changed the sample so that it demonstrates:

   1. Add and Subtract are simple services in Calculator.php that can be
     called from the client. They do not reference any other service.
     2. Multiply service can be called form the client and then uses
     a PHP_SCA injected reference to the multiply service (
     Multiply.php). The resolution and calling of this referenced
     service does not involve the Tuscany php extension (I think)
     3. Divide service can be called from the client and then uses an
     injected binding.tuscany that should go via a tuscany
     proxy/wrapper to invoke the method in Divide.php

Currently 1. works with the Python client invoking locateService which
returns a PythonProxy that is wired to the PHPServiceWrapper around
Calculator.php.

2 also works but I had to edit the pecl/sdo/sca/SCA.php
createInstanceAndFillInReferences method so that it does not always return
an SCA_TuscanyProxy if called when php is embedded. I changed this to test
for the binding type being 'tuscany' so that in case 2 a non-Tuscany proxy
gets returned.

3. Does not work as it gets a sementation violation when the
PHPServiceWrapper for the divide_service is called.
The PHPCalculator sample in svn currently has separate services for Add,
Subtract, Multiply and Divide that show different ways of coding the PHP
service. The only one of these that seems to work are the ones which have a
class and function in the php. The Add.php is odd in that the code gets
executed when the script is loaded and not when the service is called??? The
Subtract.php has a function with no class and this also failed. In my
simplified sample I removed these as components and wrote them as simple
service methods on Calculator.php.

I will investigate the segv when calling a tuscany binding from the php
component.

One more thing that seems to fail, and I'm not sure how it is supposed to
work, but the calls from the php components to
SCA::getService("log_service") can not resolve the reference. I'm not sure
how this is supposed to work but as the reference log_service is defined in
the scdl I think the getService code in SCA.php would need to call something
in the tuscany php extension to resolve this and I don't think it does. As I
say, I'm not sure how this style of call is supposed to work in php.

Cheers,

--
Pete

Reply via email to