You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by godfather_599 <go...@gmail.com> on 2013/03/26 06:17:45 UTC

Re: Replacing the WadlGenerator doesn't work

Hi, I am facing a similar problem now. Is this resolved yet?

I have something like this in my cxf.xml file:

<jaxrs:server id="class" address="/address" >
        <jaxrs:serviceBeans>
            <ref bean="Service" />
        </jaxrs:serviceBeans>
         
        <jaxrs:providers>
         <ref bean="wadlGenerator" />
        <bean id="jsonProvider"
class="org.apache.cxf.jaxrs.provider.JSONProvider" /> 
        </jaxrs:providers>
        
    </jaxrs:server> 

    

<bean id="wadlGenerator" class="com.abc.efg.util.WadlGeneratorExtended">
          
                  </bean>
        

but, apache ignores this class.. I am not seeing any changes :(          




--
View this message in context: http://cxf.547215.n5.nabble.com/Replacing-the-WadlGenerator-doesn-t-work-tp4713363p5725229.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Replacing the WadlGenerator doesn't work

Posted by godfather_599 <go...@gmail.com>.
So How do I override if they are protected?



--
View this message in context: http://cxf.547215.n5.nabble.com/Replacing-the-WadlGenerator-doesn-t-work-tp4713363p5725587.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Replacing the WadlGenerator doesn't work

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 27/03/13 20:09, godfather_599 wrote:
> Sergey,
> I am not aware of JIRA... sorry about that.. I would like to override
> handleRepresentation method as I am looking to change the response section
> of the WADL
I've made most of the generator's methods protected

Cheers, Sergey
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Replacing-the-WadlGenerator-doesn-t-work-tp4713363p5725408.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: Replacing the WadlGenerator doesn't work

Posted by godfather_599 <go...@gmail.com>.
Sergey,
I am not aware of JIRA... sorry about that.. I would like to override
handleRepresentation method as I am looking to change the response section
of the WADL



--
View this message in context: http://cxf.547215.n5.nabble.com/Replacing-the-WadlGenerator-doesn-t-work-tp4713363p5725408.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Replacing the WadlGenerator doesn't work

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 26/03/13 20:58, godfather_599 wrote:
> Hi Sergey ,
> thanks for your suggestion. Since WadlGenerator class had some private
> methods, they were not visible when I tried to modify them in the class that
> I extended. I copied the entire WadlGenerator class, changed the access
> specifier and modified the handleRepresentation method in it. Is this the
> right approach?
>
At the moment only WadlGenerator instances can be recognized as custom 
WADL providers

Can you open a JIRA and specify which private methods you'd like to extend ?

Thanks, Sergey
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Replacing-the-WadlGenerator-doesn-t-work-tp4713363p5725308.html
> Sent from the cxf-user mailing list archive at Nabble.com.


Re: Replacing the WadlGenerator doesn't work

Posted by godfather_599 <go...@gmail.com>.
Hi Sergey ,
thanks for your suggestion. Since WadlGenerator class had some private
methods, they were not visible when I tried to modify them in the class that
I extended. I copied the entire WadlGenerator class, changed the access
specifier and modified the handleRepresentation method in it. Is this the
right approach? 



--
View this message in context: http://cxf.547215.n5.nabble.com/Replacing-the-WadlGenerator-doesn-t-work-tp4713363p5725308.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Replacing the WadlGenerator doesn't work

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 26/03/13 08:17, godfather_599 wrote:
> Hi, I am facing a similar problem now. Is this resolved yet?
>
> I have something like this in my cxf.xml file:
>
> <jaxrs:server id="class" address="/address">
>          <jaxrs:serviceBeans>
>              <ref bean="Service" />
>          </jaxrs:serviceBeans>
>
>          <jaxrs:providers>
>           <ref bean="wadlGenerator" />
>          <bean id="jsonProvider"
> class="org.apache.cxf.jaxrs.provider.JSONProvider" />
>          </jaxrs:providers>
>
>      </jaxrs:server>
>
>
>
> <bean id="wadlGenerator" class="com.abc.efg.util.WadlGeneratorExtended">
>
>                    </bean>
>
>
> but, apache ignores this class.. I am not seeing any changes :(
>
I've confirmed it works, for example, in this bean,

http://svn.apache.org/repos/asf/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs/WEB-INF/beans.xml

removing a WadlGenerator bean reference fails one of 
JAXRSClientServerSpringBookTest.
Does your class extend WadlGenerator ? If yes - can you please try the 
latest released CXF version (ex, if you work with say CXF 2.5.2 - try 
2.5.9, etc)

Cheers, Sergey
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Replacing-the-WadlGenerator-doesn-t-work-tp4713363p5725229.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com