Hi! Thanks for answering. I'll try to shed a bit more light on what I'm trying to do. There's an application using Spring and I want to integrate ServiceMix into that application. The application uses a ClassPathXmlApplicationContext to fetch the root bean. The context now also reads the servicemix.xml. Now the problem with my original servicemix.xml was that it lacked a DOCTYPE and the parser used by Spring complained that "beans" should adhere to the null DOCTYPE. It ignored the namespace definitions. So I replaced the Spring 1.2.6 that comes with ServiceMix by Spring 2.0 which can cope with configuration files that use XML Schema instead of a DTD. Now it tells me that the attributes "id" and "embedded" are not allowed on the element sm:container. Looking into the servicemix-3.0-M1.xsd reveals that there are no such attributes defined for "container". Then I tried to configure it with pure Spring: <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sm="http://servicemix.apache.org/config/1.0" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="jbi" class="org.apache.servicemix.jbi.container.SpringJBIContainer"> <property name="embedded" value="true"/> <property name="componentNames"> <list> <value>kontobinding</value> </list> </property> </bean> <bean id="kontobinding" class="org.apache.servicemix.tck.ReceiverComponent"> <property name="service"> <bean class="javax.xml.namespace.QName"> <constructor-arg value="http://c1wps.de/esb/" /> <constructor-arg value="kontobinding" /> </bean> </property> <property name="endpoint" value="de.c1wps.esb.binding.KontoServiceBinding" /> </bean> <bean id="client" class="org.apache.servicemix.client.DefaultServiceMixClient"> <constructor-arg ref="jbi" /> </bean> <bean id="kontoClient" class="de.c1wps.esb.client.Client"> <property name="client" ref="client"/> </bean> </beans> The original configuration looked like this: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns:sm="http://servicemix.apache.org/config/1.0" xmlns:wps="http://c1wps.de/esb/"> <sm:container id="jbi" embedded="true"> <sm:activationSpecs> <sm:activationSpec id="kontobinding" service="wps:kontobinding"> <sm:component><bean class="de.c1wps.esb.binding.KontoServiceBinding"/></sm:component> </sm:activationSpec> </sm:activationSpecs> </sm:container> <bean id="client" class="org.apache.servicemix.client.DefaultServiceMixClient"> <constructor-arg ref="jbi" /> </bean> <bean id="kontoClient" class="de.c1wps.esb.client.Client"> <property ref="client"/> </bean> </beans> But this original configuration cannot work iin a normal Spring environment. There is no DOCTYPE and no namespace definition for the default namespace. I think the problem here is that I'm using the ClassPathXmlApplicationContext which has no idea of XBeans. Can you give me a hint what I have todo to also load XBeans. Your examples work because they run inside ServiceMix. Here it's the other way round. ServiceMix runs inside another application. The "kontoClient"-bean will eventually be a Swing-based application using ServiceMix. BTW: Is it possible to use the Client API to connect a remote ServiceMix server. The examples only show the situation where the jbi container is started inside the same application. Thanks in advance, Robert -- View this message in context: http://www.nabble.com/Trying-to-make-ServiceMix-run-embedded-inside-Spring-t1728207.html#a4702079 Sent from the ServiceMix - User forum at Nabble.com.
