You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Balaji Ravi <ba...@gmail.com> on 2006/10/02 19:34:57 UTC
Binding factory Registration
Hi,
I am trying to write a new Binding Factory & getting it registered with the
bus. I am using a configuration based approach for this & it looks that it
has been changed over the past week...
I used to have a bus-extensions.xml file which had my binding factory & the
namespace that it needed to be registered under but now i see that we have a
cxf directory with a cxf-extension.xml which does the registration of the
binding factory... Was it done on purpose? If so, can someone explain the
reasoning of doing the configuration this way? For the soap binding, i see
both the xml files present in the resources/META-INF directory...
Also, for creating the service model, i need to register custom extensions
to the jwsdl model. I see that we have an extensions.xml file in the
META-INF folder of http transport which contains the mapping for these
custom extensions for the transports & bindings. Should i also follow a
similar approach? Is there any way i can do this via code? The problem with
doing it in code is that when i get my binding factory instantiated, the
service model has already been built...
Thanks
Balaji
Re: Binding factory Registration
Posted by Andrea Smyth <an...@iona.com>.
Balaji Ravi wrote:
> Hi,
>
> I am trying to write a new Binding Factory & getting it registered
> with the
> bus. I am using a configuration based approach for this & it looks
> that it
> has been changed over the past week...
>
> I used to have a bus-extensions.xml file which had my binding factory
> & the
> namespace that it needed to be registered under but now i see that we
> have a
> cxf directory with a cxf-extension.xml which does the registration of the
> binding factory... Was it done on purpose? If so, can someone explain the
> reasoning of doing the configuration this way?
Hi Balaji,
This is JIRA CXF-30 - in response to recent discussions on configuration
in CXF and the decision to adopt an IOC based approach using Spring (see
also
http://cwiki.apache.org/confluence/display/CXF/Configuration+Requirements
and http://cwiki.apache.org/confluence/display/CXF/Configuration+Design).
While retaining other bus implementations (i.e. the CXF bus, which uses
the bus-extension.xml file fragments) the Spring based bus is now the
default..
You MUST provide a Spring beans cfg file (cxf-extension.xml) - and
optionally may also add the bus-extensions.xml. I don't believe however
that we can keep the two buses in sync longterm, so don't bother about
the latter. In any case, it's not like the CXF bus is completely
independent of Spring - it uses Spring only to inject property values
into configurable components (but it does not inject dependencies).
> For the soap binding, i see
> both the xml files present in the resources/META-INF directory...
>
> Also, for creating the service model, i need to register custom
> extensions
> to the jwsdl model. I see that we have an extensions.xml file in the
> META-INF folder of http transport which contains the mapping for these
> custom extensions for the transports & bindings. Should i also follow a
> similar approach? Is there any way i can do this via code? The problem
> with
> doing it in code is that when i get my binding factory instantiated, the
> service model has already been built...
To register your extensions up-front, just supply an extensions.xml file
in META-INF - similar to the ones in rt-transports-http, rt-bindings-xml
etc.
The wsdl manager, when it initializes, grabs all extensions.xml
properties files and registers the listed extensions.
We should probably replace these properties files by Spring bean files
(or add appropriate bean definitions to cxf-extension.xml files) so that
by default we are only dealing with one file format. Not urgent though.
Andrea.
>
>
> Thanks
>
> Balaji
>