You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Walzer, Thomas" <th...@integratix.net> on 2012/08/22 13:12:09 UTC
LDAP/Blueprint/constructor-arg
Hi everyone,
I would like to get a simple LDAP-example (basically an xmlified variant from the ldap-component-page) running. However, my blueprint.xml is invalid with regard to the schemas because of the "constructor-arg" element.
E [Xerces] cvc-complex-type.2.4.a: Invalid content was found starting with element 'constructor-arg'. One of '{"http://www.osgi.org/xmlns/blueprint/v1.0.0":description, "http://www.osgi.org/xmlns/blueprint/v1.0.0":argument, "http://www.osgi.org/xmlns/blueprint/v1.0.0":property, WC[##other:"http://www.osgi.org/xmlns/blueprint/v1.0.0"]}' is expected.
Is there another way to get these properties set?
I am a bit of a camel-noob, so any hint what I am missing is really appreciated.
Regards, Thomas.
----
<?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:camel="http://camel.apache.org/schema/blueprint"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
<bean id="shutdown" class="org.apache.camel.impl.DefaultShutdownStrategy">
<property name="timeout" value="10"/>
</bean>
<bean id="ldapserver" class="javax.naming.directory.InitialDirContext" scope="prototype">
<constructor-arg>
<props>
<prop key="javax.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</prop>
<prop key="javax.naming.provider.url">ldap://myldap.mydomain.com</prop>
<prop key="javax.naming.security.authentication">none</prop>
</props>
</constructor-arg>
</bean>
<camelContext trace="false" id="ctxLDAP" xmlns="http://camel.apache.org/schema/blueprint">
<route id="rtLDAP" autoStartup="true">
<from uri="timer://foo?period=60000"/>
<setBody>
<constant>(sn=*)</constant>
</setBody>
<to uri="ldap:ldapserver"/>
<log message="=== ${body}"/>
</route>
</camelContext>
</blueprint>
-----
My environment:
camel-2.8.0.fuse-06-11
java 1.6.0_27
karaf 2.2.2-fuse-07-11
Windows 2003 R2
Re: LDAP/Blueprint/constructor-arg
Posted by "michal.warecki" <mi...@gmail.com>.
In blueprint is "argument" element i.e.:
<bean id="myList" class="java.util.ArrayList">
<argument type="int" value="10"/>
</bean>
--
View this message in context: http://camel.465427.n5.nabble.com/LDAP-Blueprint-constructor-arg-tp5717847p5717849.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: LDAP/Blueprint/constructor-arg
Posted by Babak Vahdat <ba...@swissonline.ch>.
Hi
The <constructor-arg> tag is what Spring understands but not
Aries-Blueprint, so why you get the parsing exception through Xerces. You
could look at here about what Aries-Blueprint provides you:
http://aries.apache.org/modules/blueprint.html#bean-construction
And as well the Blueprint XSD is already given by your XML snippet where you
could see the XML grammer Aries-Blueprint does understand:
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
Babak
--
View this message in context: http://camel.465427.n5.nabble.com/LDAP-Blueprint-constructor-arg-tp5717847p5717850.html
Sent from the Camel - Users mailing list archive at Nabble.com.