You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Osvaldo Pina <os...@gmail.com> on 2011/08/25 20:35:07 UTC
Programmatic rest service creation.
Hi,
I have a scenario where I have to create rest services for a
implementation class that already exists. I created a adapter that adapts an
annotated rest class to the implementation class and it worked fine, but it
would be better for me if I could provide some configuration (probably a xml
file) and programmability create the rest services based on this
configuration. Something like this:
public Class MyImplementationClass {
public int ten() {
return 10;
}
}
<service-definition>
<path>/ten</path>
<class>MyImplementationClass</class>
<method>ten</method>
</service-definition>
Can anyone help me on that?
Ats,
Osvaldo Pina.
Re: Programmatic rest service creation.
Posted by Osvaldo Pina <os...@gmail.com>.
Thanks a lot!
On Fri, Aug 26, 2011 at 6:51 AM, Sergey Beryozkin <sb...@gmail.com>wrote:
> Hi
>
> the following feature has been created specifically for addressing the
> requirements like yours,
>
>
> http://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-RESTfulserviceswithoutannotations
>
> Cheers, Sergey
>
> On Thu, Aug 25, 2011 at 7:35 PM, Osvaldo Pina <os...@gmail.com>
> wrote:
> > Hi,
> >
> > I have a scenario where I have to create rest services for a
> > implementation class that already exists. I created a adapter that adapts
> an
> > annotated rest class to the implementation class and it worked fine, but
> it
> > would be better for me if I could provide some configuration (probably a
> xml
> > file) and programmability create the rest services based on this
> > configuration. Something like this:
> >
> > public Class MyImplementationClass {
> >
> > public int ten() {
> > return 10;
> > }
> > }
> >
> > <service-definition>
> > <path>/ten</path>
> > <class>MyImplementationClass</class>
> > <method>ten</method>
> > </service-definition>
> >
> > Can anyone help me on that?
> >
> >
> > Ats,
> > Osvaldo Pina.
> >
>
>
>
> --
> Sergey Beryozkin
>
> http://sberyozkin.blogspot.com
> Talend - http://www.talend.com
>
Re: Programmatic rest service creation.
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
the following feature has been created specifically for addressing the
requirements like yours,
http://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-RESTfulserviceswithoutannotations
Cheers, Sergey
On Thu, Aug 25, 2011 at 7:35 PM, Osvaldo Pina <os...@gmail.com> wrote:
> Hi,
>
> I have a scenario where I have to create rest services for a
> implementation class that already exists. I created a adapter that adapts an
> annotated rest class to the implementation class and it worked fine, but it
> would be better for me if I could provide some configuration (probably a xml
> file) and programmability create the rest services based on this
> configuration. Something like this:
>
> public Class MyImplementationClass {
>
> public int ten() {
> return 10;
> }
> }
>
> <service-definition>
> <path>/ten</path>
> <class>MyImplementationClass</class>
> <method>ten</method>
> </service-definition>
>
> Can anyone help me on that?
>
>
> Ats,
> Osvaldo Pina.
>
--
Sergey Beryozkin
http://sberyozkin.blogspot.com
Talend - http://www.talend.com