Hi Fabio, Yes, you should be able to include the intent-map.xml file in your own bundle. Your bundle shouldn't have to be a fragment for that. The intent map that is part of the distro is the default intent map and the one in your bundle is specific to your application, so it overrides the default.
Does this answer your question? Cheers, David On 27 October 2010 15:53, Fabio souza <[email protected]> wrote: > Hi everybody, > > I have a doubt corcerning the mecanism to include intents in CXF/DOSGi > implementation. To create a new intent I had to modify the intent-map file > that is included in DOSGi distribution. Is this the right approach? > > Well, let me detail a bit more what I did. I created a bundle called > Monitor.jar to contain my extensions (new intents). Basically, that bundle > contains the feature and the interceptors that implement the intents. > > To make spring understand my new intents, I followed spring instructions and > did the following: > > 1. Authored an XML schema to describe my custom elements and included that > schema in my bundle (schemas/monitoring.xsd). > 2. Coded a custom NamespaceHandler implementation that parses my elements > which represent my intents in the intent-map file. > 3. Registered the above artifacts with Spring in order to make it aware of > my custom elements. To do that I included META-INF/spring.handlers and > META-INF/spring.schemas files in my bundle. > > So far, so good. However, in order to use those intents, I had to modify the > intent-map.xml file stored in cxf-dosgi-ri-dsw-cxf-<xxx>.jar bundle: > > <beans xmlns="http://www.springframework.org/schema/beans" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:p="http://cxf.apache.org/policy" > xmlns:wsp="http://www.w3.org/ns/ws-policy" > xmlns:wsu=" > http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd > " > xmlns:core="http://cxf.apache.org/core" > xmlns:monitoring="http://br.ufpe.cin.dynaserv/monitoring" > xmlns:soap="http://cxf.apache.org/bindings/soap" > xsi:schemaLocation=" > http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd > http://www.w3.org/ns/ws-policy > http://www.w3.org/2007/02/ws-policy.xsd > http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd > http://br.ufpe.cin.dynaserv/monitoring > http://br.ufpe.cin.dynaserv/monitoring.xsd > http://cxf.apache.org/bindings/soap > http://cxf.apache.org/schemas/configuration/soap.xsd > http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans.xsd"> > <bean id="intentMap" class="org.apache.cxf.dosgi.dsw.qos.IntentMap"> > <property name="intents"> > <map> > <entry key="addressing" value-ref="nonDecoupledAddressing"/> > <entry key="logging" value-ref="messageLogging"/> > <entry key="timer" value-ref="timerId"/> > <entry key="SOAP" value-ref="soap11Binding"/> > <entry key="SOAP.1_1" value-ref="soap11Binding"/> > <entry key="SOAP.1_2" value-ref="soap12Binding"/> > <entry key="HTTP" value="PROVIDED"/> > </map> > </property> > </bean> > > <p:policies id="nonDecoupledAddressing"> > <wsp:PolicyReference URI="#AddressingPolicy"/> > </p:policies> > > <wsp:Policy wsu:Id="AddressingPolicy" > xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata"> > <wsam:Addressing> > <wsp:Policy /> > </wsam:Addressing> > </wsp:Policy> > > <core:logging id="messageLogging"/> > > <monitoring:timer id="timerId"/> > > <soap:soapBinding id="soap11Binding" version="1.1"/> > <soap:soapBinding id="soap12Binding" version="1.2"/> > > </beans> > > Well, it wasn't difficult, but I thought that I would be able to include > that intent-map file in my own bundle (which could be a fragment of the > DOSGi one). Could you please comment on this point? I am not sure whether I > was clear, but fell free to ask me anything about it. > > Thank you very much! > > -- > Fábio >
