|
From: Winterfeldt, D. \(IT\) <Dav...@mo...> - 2007-05-08 17:23:22
|
I'm not sure if this would have been more appropriate for the user list or not. If it is, please let me know and I will resend to that list. I'm using version Spring 2.0.3. I'd like to delegate parsing from within a custom parser back to the default Spring beans parsing to leverage default Spring functionality. =20 <mesh:process-remote id=3D"testRemote"> <property name=3D"sender"><ref = local=3D"helloServiceSender"/></property> </mesh:process-remote> =20 When I call parserContext.getDelegate().parseCustomElement(element, builder.getBeanDefinition()) in my custom parser, I get an exception. org.springframework.beans.factory.parsing.BeanDefinitionParsingException : Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.springframework.org/schema/beans] Offending resource: class path resource [com/ms/bfservices/mesh/controller/config/refs-applicationContext.xml] =20 When I debug this, the default namespace for Spring isn't in DefaultNamepsaceHandler.handlerMappings (below is it's contents). I would think at this point that even if the default namespace isn't registered, it would still pass the default handler back.=20 DefaultNamespaceHandler public NamespaceHandler resolve(String namespaceUri) { return (NamespaceHandler) this.handlerMappings.get(namespaceUri); } =20 Contents of handlerMappings {http://www.springframework.org/schema/jee=3Dorg.springframework.ejb.conf= i g.JeeNamespaceHandler@d3ade7 <http://www.springframework.org/schema/jee=3Dorg.springframework.ejb.conf= i g.JeeNamespaceHandler@d3ade7>=20 =20 http://www.springframework.org/schema/util=3Dorg.springframework.beans.fa= c tory.xml.UtilNamespaceHandler@13e4a5a <http://www.springframework.org/schema/util=3Dorg.springframework.beans.f= a ctory.xml.UtilNamespaceHandler@13e4a5a>=20 =20 http://www.springmodules.org/validation/bean/validator=3Dorg.springmodule= s .validation.bean.conf.namespace.ValidatorNamespaceHandler@8390b0 <http://www.springmodules.org/validation/bean/validator=3Dorg.springmodul= e s.validation.bean.conf.namespace.ValidatorNamespaceHandler@8390b0>=20 =20 http://www.springframework.org/schema/aop=3Dorg.springframework.aop.confi= g .AopNamespaceHandler@19050a0 <http://www.springframework.org/schema/aop=3Dorg.springframework.aop.conf= i g.AopNamespaceHandler@19050a0>=20 =20 http://www.morganstanley.com/schema/bfservices/mesh=3Dcom.ms.bfservices.m= e sh.beandef.MeshNameSpaceHandler@ec898a <http://www.morganstanley.com/schema/bfservices/mesh=3Dcom.ms.bfservices.= m esh.beandef.MeshNameSpaceHandler@ec898a>=20 =20 http://www.springframework.org/schema/tx=3Dorg.springframework.transactio= n .config.TxNamespaceHandler@13a0212 <http://www.springframework.org/schema/tx=3Dorg.springframework.transacti= o n.config.TxNamespaceHandler@13a0212>=20 =20 http://www.springframework.org/schema/p=3Dorg.springframework.beans.facto= r y.xml.SimplePropertyNamespaceHandler@15e0c2b <http://www.springframework.org/schema/p=3Dorg.springframework.beans.fact= o ry.xml.SimplePropertyNamespaceHandler@15e0c2b> } =20 Thanks for any help. David -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender = does not intend to waive confidentiality or privilege. Use of this email = is prohibited when received in error. |
|
From: Taras T. <mai...@gm...> - 2007-05-08 18:05:54
|
Winterfeldt, David (IT) wrote: > I'm not sure if this would have been more appropriate for the user list > or not. If it is, please let me know and I will resend to that list. > > I'm using version Spring 2.0.3. I'd like to delegate parsing from > within a custom parser back to the default Spring beans parsing to > leverage default Spring functionality. > > <mesh:process-remote id="testRemote"> > <property name="sender"><ref local="helloServiceSender"/></property> > </mesh:process-remote> > > When I call parserContext.getDelegate().parseCustomElement(element, > builder.getBeanDefinition()) in my custom parser, I get an exception. I assume you want to use something like: ---- parserContext.getDelegate().parsePropertyElement(element, definition) ---- -tt |
|
From: Winterfeldt, D. \(IT\) <Dav...@mo...> - 2007-05-08 21:20:00
|
Thank you. I have everything working now. I should have looked at the delegate class more closely. David -----Original Message----- From: spr...@li... [mailto:spr...@li...] On Behalf Of Taras Tielkes Sent: Tuesday, May 08, 2007 2:20 PM To: spr...@li... Subject: Re: [Springframework-developer] Custom XML Parsing Issue Winterfeldt, David (IT) wrote: > I'm not sure if this would have been more appropriate for the user=20 > list or not. If it is, please let me know and I will resend to that list. >=20 > I'm using version Spring 2.0.3. I'd like to delegate parsing from=20 > within a custom parser back to the default Spring beans parsing to=20 > leverage default Spring functionality. >=20 > <mesh:process-remote id=3D"testRemote"> > <property name=3D"sender"><ref = local=3D"helloServiceSender"/></property> > </mesh:process-remote> =20 >=20 > When I call parserContext.getDelegate().parseCustomElement(element, > builder.getBeanDefinition()) in my custom parser, I get an exception. I assume you want to use something like: ---- parserContext.getDelegate().parsePropertyElement(element, definition) ---- -tt ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender = does not intend to waive confidentiality or privilege. Use of this email = is prohibited when received in error. |