Thanks Claus,

That’s sort of what I figured.  I couldn’t find anything relevant to PHP on the 
web and was thinking that might be the case.  I understand it’s not a very 
common use case and was more curious than anything else.

We’re integrating a bunch of Symfony command line php scripts with a 
preservation system and a CMS, and thought it would be nice for our community 
(which is mostly php developers) to be able to use that feature of camel if 
they needed to do some one-liners in a blueprint xml without dipping into Java.

Javascript will do just fine, though.  Or they can just learn a little Java :D

Thanks again.  As always, the Camel community is prompt and courteous.

~Danny

On Jul 2, 2015, at 11:36 AM, Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
> 
> Yeah there is only specialized camel-script-xxx features for those
> that works in OSGi like ruby, javascript.
> 
> You cannot use php, or at least we have no osgi bundle of a library
> that works and that we test with.
> 
> And is there any reason you cannot just use any of the other scripting
> language or java.
> 
> On Tue, Jun 30, 2015 at 9:32 PM, Daniel Lamb <dan...@discoverygarden.ca> 
> wrote:
>> Hi,
>> 
>> Has anyone out there ever successfully used PHP within camel routes running 
>> in an OSGi container?   I keep getting the following error despite having 
>> camel-script installed: Bundle php_test.xml is waiting for dependencies 
>> [(&(language=php)(objectClass=org.apache.camel.spi.LanguageResolver))]
>> 
>> Is there an extra dependency for it a la camel-script-groovy or 
>> camel-script-jruby?  Is this even possible?
>> 
>> Google does not provide much information on the subject, though it alludes 
>> to a Quercus OSGi bundle which appears to be an abandoned effort?
>> 
>> Here’s the route I’m playing around with:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> 
>> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
>>           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>           
>> xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0";
>>           xsi:schemaLocation="
>>           http://www.osgi.org/xmlns/blueprint/v1.0.0 
>> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd";>
>> 
>>  <camelContext xmlns="http://camel.apache.org/schema/blueprint";>
>> 
>>    <route>
>>      <description>Tests PHP</description>
>>      <from uri="timer://foo?period=1000"/>
>>        <transform><language language="php">'TEST'</language></transform>
>>        <log message="${body}"/>
>>    </route>
>> 
>>  </camelContext>
>> 
>> </blueprint>
>> 
>> ~Danny
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cib...@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
> hawtio: http://hawt.io/
> fabric8: http://fabric8.io/

Reply via email to