Hello Emannuel, You need to add files named spring.handlers and spring.schemas in META-INF directory. Spring uses these two files to resolve namespace handler *and* link it with XML Schema.
Regarding blueprint - may you check servicemix-http blueprint configuration [1]? It a bit longer and have few things more eg. Namespace Handler, Executor Factory and endpoints. Best regards, Lukasz [1] http://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-http/trunk/src/main/resources/OSGI-INF/blueprint/servicemix-http.xml -----Original Message----- From: Emmanuel Guiton [mailto:[email protected]] Sent: Thursday, November 18, 2010 6:23 PM To: [email protected] Subject: XML configuration : issues with Blueprint and Spring Hello all, Investigating deeper in our XML configuration issues, we understood (correct me if I am wrong) that the files with the root element : - <beans xmlns="http://www.springframework.org/schema/beans"> are managed with Spring-DM (the XML file is resolved using SpringURLHandler) - <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"> are managed with Blueprint (the XML file is resolved using BlueprintURLHandler) In Karaf, services configured through these XML files appear whether in the spring column (first case) or in the blueprint column (second case). Now, come the troubles : Using Spring-DM config file, we always end with the following exception : 17:56:15,066 | DEBUG | xtenderThread-12 | NamespacePlugins | nternal.support.NamespacePlugins 191 | 73 - org.springframework.osgi.extender - 1.2.0 | Trying to resolving entity for null|http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0/vsphere-b null|c.xsd 17:56:15,098 | WARN | xtenderThread-12 | XmlBeanDefinitionReader | k.util.xml.SimpleSaxErrorHandler 47 | 60 - org.springframework.beans - 3.0.3.RELEASE | Ignored XML validation warning org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0/vsphere-bc.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. Which basically means Spring cannot find our custom schema http://esb.intrinsec.com/components/vmware/vsphere-bc/1.0/vsphere-bc.xsd though it is installed with our custom component. Is there anything special we have to do to make Spring find the file ? Use a particular plugin when generating our component ? If we turn to Blueprint, we did not succeed in embedding our custom XML namespace but we (kind of) succeeded in using a pure blueprint XML file (see attached file). However, though we can see the endpoint in the logs : 18:13:54,963 | DEBUG | rint Extender: 2 | ServiceRecipe | lueprint.container.ServiceRecipe 261 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Service created: Endpoint[service: {com.intrinsec.esb.vmware.vsphere}alpha, endpoint: provider, role: provider] we cannot find it in Karaf with nmr:list, and when we try our complete service, it fails with the following error : 18:16:16,768 | WARN | sb/vmware/alpha/ | NMR | .servicemix.nmr.core.ChannelImpl 293 | 81 - org.apache.servicemix.nmr.core - 1.3.0.fuse-01-00 | Error processing exchange [...] org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints. Anyone has any clue on what could go wrong ? Thanks, - emmanuel -- Ingénieur études et développements Intrinsec 215, avenue Georges Clemenceau 92000 Nanterre http://www.intrinsec.com Emmanuel GUITON Ingénieur développement Standard : +33 1 41 91 77 77 l Fax : +33 1 41 91 77 78 215, avenue Georges Clemenceau l 92024 NANTERRE http://infogerance.intrinsec.com/2010/04/informatique-de-lunicef-un-cloud-au-secours-dhaiti.html http://www.intrinsec.com/
