I have no problems invoking a Python component from Python or Ruby
clients.

=.=.=.=.=.=.=.=.=.=.=.=.=.=.=.
. Travis Vitek               =
= Software Developer         .
. Rogue Wave Software        =
= http://www.roguewave.com   .
.=.=.=.=.=.=.=.=.=.=.=.=.=.=.=

>-----Original Message-----
>From: Andrew Borley [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, July 03, 2007 1:37 AM
>To: [email protected]
>Subject: Re: invoking a non-c++ service from c++
>
>Hi Travis,
>
>It's been a little while since I looked at this code, but I think it
>should work. The simple questions first:
>
>Is your Python environment set up correctly? For the M3 Tuscany SCA
>Native release we require Python 2.5 because we use the ElementTree
>XML API. You will also need to ensure that the Python runtime
>libraries are on your PATH and the Tuscany Python extension is on the
>PYTHONPATH environment variable.
>
>If you are using the M2 Tuscany SCA C++ release then you will require
>a .componentType file as well as the .composite and .py
>implementation. The one used in the PythonCalculator sample should be
>fine [1]
>
>Can you get the PythonCalculator sample to run successfully? If so,
>I'll need to do more investigation!
>
>Let me know if any of these things help.
>
>Cheers
>Andy
>
>[1] 
>http://svn.apache.org/repos/asf/incubator/tuscany/tags/cpp-1.0-
>incubating-M2-final/sca/samples/PythonCalculator/sample.calcula
tor/DivideImpl.componentType
>On 7/3/07, Travis Vitek <[EMAIL PROTECTED]> wrote:
>>
>> > OK I think  understand. You are using the C++ client from
>> > CppCalulator to try and access the RubyCalulator component?
>>
>> Exactly. Ruby, Python or whatever. You get the idea.
>>
>> > At the moment there is a restriction here in that the C++
>> > client can only locate/call a C++ service. This is because
>> > the locateService returns a C++ proxy to the service. These
>> > are generated by the scagen utility form the information in
>> > the interface headers, composite and componentType files and
>> > built into the implementation dll. For a Ruby component
>> > implementation there is no dll and no generated proxy.
>>
>> Yeah, I build the source distribution and stepped into it. I 
>think I'm
>> seeing the problem.
>>
>> > You can call Ruby components from C++ components as here the
>> > interface on the reference from the C++ component to the Ruby
>> > component is sufficeient to generate the proxy which will be
>> > built in to the c++ component implementation dll.
>>
>> Well, I managed to get CppCalculator to reference the Ruby
>> DivideComponent. That seemed to work without a hitch. 
>Unfortunately it
>> bombs out if I attempt to use the python DivideComponent 
>implementation.
>> Since I'm just getting started with this SCA stuff, I'll 
>outline what I
>> did.
>>
>> I copied the RubyCalculator/sample.calculator/DivideImpl.rb and
>> PythonCalculator/sample.calculator/DivideImpl.py files into
>> CppCalculator/deploy/sample.calculator. I opened up
>> 
>CppCalculator/deploy/sample.calculator/sample.calculator.composite and
>> added component entries for the Ruby and Python implementations,
>> commenting out all but one of the them for testing. So I 
>have something
>> like this.
>>
>>         <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
>>                 name="sample.calculator">
>>
>>                 <component name="CalculatorComponent">
>>                         <implementation.cpp library="Calculator"
>> header="CalculatorImpl.h"/>
>>                         <reference
>> name="divideService">DivideComponent/DivideService</reference>
>>                 </component>
>>
>>         <!--
>>                 <component name="DivideComponent">
>>                         <implementation.cpp library="Calculator"
>> header="DivideImpl.h"/>
>>                 </component>
>>         -->
>>
>>         <!--
>>                 <component name="DivideComponent">
>>                         <implementation.ruby script="DivideImpl.rb"
>> class="DivideImpl"/>
>>                 </component>
>>         -->
>>
>>                 <component name="DivideComponent">
>>                         <implementation.python module="DivideImpl"
>> scope="composite"/>
>>                 </component>
>>
>>         </composite>
>>
>> Then I ran the C++ client test program
>> CppCalculator/deploy/sample.calculator.client/runclient.bat. As
>> mentioned above, everything works just fine using the C++ and Ruby
>> implementations, but it crashes out with the Python one. All of this
>> testing is being done with the binary distribution, just to eliminate
>> the chance of any issues being caused by a bad build.
>>
>> If I did something wrong, maybe someone could let me know?
>>
>> Travis
>>
>> > Cheers,
>> >
>> > On 01/07/07, Travis Vitek <[EMAIL PROTECTED]> wrote:
>> > >
>> > > I'm using the Calculator example services. I setup a batch
>> > > file to run each client implementation against each service
>> > > implementation. Before running a client, I set the
>> > > TUSCANY_SCACPP_ROOT environment variable. I can provide that
>> > > batch file if you'd like.
>> > >
>> > > Travis
>> > >
>> > > -----Original Message-----
>> > > From: Pete Robbins
>> > >
>> > > Hi Travis. Could you post your .composite and .comonentType
>> > > files please. There may be a restriction of calling a Ruby
>> > > component directly from a C++ client... I'd need to check.
>> > > Have you tried having the client call initially into a C++
>> > > component which then invokes the Ruby component?
>> > >
>> > > Cheers,
>> > >
>> > > On 30/06/07, Travis Vitek <[EMAIL PROTECTED]> wrote:
>> > > >
>> > > > I've been playing with Tuscany SCA for a few days and
>> > > > I've run into something that I believe should work but
>> > > > does not. As the subject indicates, I'm trying to invoke
>> > > > a local non-c++ service from a c++ client via Tuscany
>> > > > SCA Native....
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to