You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2015/04/29 13:51:14 UTC

No grammar in WADL with CXF 3.0.5-SNAPSHOT

Hi,
when using the latest CXF 3.0.5-SNAPSHOT and this configuration [1] I 
get an empty

<grammars/>

element when accessing ?_wadl

With 3.0.4 everything works, instead: any relevant configuration change?

Thanks,
Regards.

[1] 
https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 04/05/2015 22:16, Sergey Beryozkin wrote:
> Hi Francesco
>
> Good stuff, thanks for isolating the problem.
> I'm not sure how to make it easier on the CXF side - I'll update the 
> generator to log a warning (will make it into 3.1.1-SNAPSHOT though 
> :-)) when a JAXBContext is null despite a number of JAXB class 
> candidates being available - that should at least help to narrow down 
> a problem a bit...

Sounds good: FYI I've also added the JAXB debug option to cargo in the 
debug profile ;-)

Regards.

> On 04/05/15 15:12, Francesco Chicchiriccò wrote:
>> Problem solved: AbstractPolicyTO on master was missing a default no-arg
>> contructor (which is actually not required because one has normally to
>> instantiate one of its child classes).
>> I've solved by adding a useless private constructor like as
>>
>>      private AbstractPolicyTO() {
>>          throw new UnsupportedOperationException("No-arg constructor is
>> just to keep JAXB from complaining");
>>      }
>>
>> Now it works :-)
>>
>> Incidentally, I've also migrated to CXF 3.1.0-SNAPSHOT, waiting for
>> upcoming release(s): all tests are green, cool :-)
>>
>> Regards.
>>
>> On 30/04/2015 14:45, Sergey Beryozkin wrote:
>>> One thing is that AbstractPolicyTO is abstract, so may that is causing
>>> a problem...
>>>
>>> Thanks, Sergey
>>>
>>> On 30/04/15 13:32, Sergey Beryozkin wrote:
>>>> Hi Francesco,
>>>> PolicyServiceImpl is the first one that causes issues. I've added only
>>>> PolicyServiceImpl, this is a list of classes that JAXBContext is 
>>>> created
>>>> from
>>>>
>>>> org.apache.syncope.common.lib.to.AbstractPolicyTO,
>>>> org.apache.syncope.common.lib.to.PasswordPolicyTO,
>>>> org.apache.syncope.common.lib.to.SyncPolicyTO,
>>>> org.apache.syncope.common.lib.to.AccountPolicyTO]
>>>>
>>>> and JAXBContext is null (something in those classes is causing a
>>>> JAXBContext creation failure) and therefore a grammar is empty...
>>>>
>>>> The code I've added few days back is not run. I'm cautiotiosuly
>>>> optimistic that it is not a CXF issue...
>>>>
>>>> Can you please have a look at those 4 classes ? May be do a 
>>>> JAXBContext
>>>> creation from them in a unit test ? I guess I might also configure the
>>>> cargo plugin to pass a JAXB debug property, not sure how though :-)
>>>>
>>>> Thanks, Sergey
>>>>
>>>>
>>>>
>>>>
>>>> On 30/04/15 11:43, Sergey Beryozkin wrote:
>>>>> Indeed, can see it too with a single UserServiceImpl bean. Going to
>>>>> narrow down now....
>>>>>
>>>>> Sergey
>>>>> On 30/04/15 09:53, Francesco Chicchiriccò wrote:
>>>>>> On 30/04/2015 10:46, Sergey Beryozkin wrote:
>>>>>>> Hi Francesco,
>>>>>>> np, I did not have a chance to test yesterday too, thanks for a 
>>>>>>> test
>>>>>>> on your end,
>>>>>>>
>>>>>>> I suspect a new type has been introduced in one of the other 
>>>>>>> Syncope
>>>>>>> services which is added to the collection of types for JAXBContext
>>>>>>> and
>>>>>>> the JAXB context creation fails.
>>>>>>>
>>>>>>> Can you please give me a favor and list all other beans 
>>>>>>> explicitly, I
>>>>>>> guess that will not work, and then we can check which service 
>>>>>>> bean is
>>>>>>> 'to blame' ? If you are busy with something else: then please type
>>>>>>> the
>>>>>>> complete list of beans in the jaxrs:endpoint - I'll have a look 
>>>>>>> right
>>>>>>> now then...
>>>>>>
>>>>>> Since it looks like a Syncope's issue, I can't pretend to stuck 
>>>>>> you on
>>>>>> it! :-)
>>>>>> I'll take a look at new types in 2.0.0 to see what is causing 
>>>>>> troubles
>>>>>> to JAXB (maybe the easiest way is to run the live tests with
>>>>>> application/xml - we still feature that).
>>>>>> Thanks for your assistance.
>>>>>>
>>>>>> Anyway, the list of beans to be listed under jaxrs:endpoint is 
>>>>>> barely
>>>>>> any non-abstract class under
>>>>>>
>>>>>> https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service 
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards.
>>>>>>
>>>>>>> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>>>>>>>> Hi Sergey,
>>>>>>>> sorry for late notice; I've tested two different configurations on
>>>>>>>> master:
>>>>>>>>
>>>>>>>> 1. untouched configuration, CXF 3.0.4
>>>>>>>>
>>>>>>>> same situation, empty <grammars/>
>>>>>>>>
>>>>>>>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>>>>>>>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>>>>>>>
>>>>>>>> Konsole output    <jaxrs:server id="restContainer" address="/"
>>>>>>>> - basePackages="org.apache.syncope.common.rest.api.service,
>>>>>>>> org.apache.syncope.core.rest.cxf.service"
>>>>>>>> staticSubresourceResolution="true">
>>>>>>>> +    <jaxrs:serviceBeans>
>>>>>>>> +      <ref bean="userServiceImpl"/>
>>>>>>>> +    </jaxrs:serviceBeans>
>>>>>>>>
>>>>>>>> e.g. configuring the sole UserService: I confirm it works, as in
>>>>>>>> your
>>>>>>>> case.
>>>>>>>>
>>>>>>>> Any hint of what I am doing wrong? Thanks.
>>>>>>>>
>>>>>>>> Regards.
>>>>>>>>
>>>>>>>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>>>>>>>> I've built the master branch, will be looking the first thing
>>>>>>>>> tomorrow
>>>>>>>>> morning, should have time before a release...
>>>>>>>>>
>>>>>>>>> Thanks, Sergey
>>>>>>>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>>>>>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>>>>>>>> Hi Francesco
>>>>>>>>>>>
>>>>>>>>>>> I've done a local test by copying UserService,
>>>>>>>>>>> AbstractServiceImpl,
>>>>>>>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>>>>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and 
>>>>>>>>>>> stopping
>>>>>>>>>>> there
>>>>>>>>>>> are adapting PagedResult accordingly), and I'm seeing a schema
>>>>>>>>>>> being
>>>>>>>>>>> generated. I think the code I did few days ago is fine, it 
>>>>>>>>>>> should
>>>>>>>>>>> only
>>>>>>>>>>> make the generation better, so I wonder where the problem is.
>>>>>>>>>>>
>>>>>>>>>>> Can you give me a favor and remind how can I run Syncope in a
>>>>>>>>>>> debug
>>>>>>>>>>> mode from Maven so that I can hit a breakpoint in 
>>>>>>>>>>> WADLGenerator ?
>>>>>>>>>>> this
>>>>>>>>>>
>>>>>>>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>>>>>>>> slightly different than before - you need to
>>>>>>>>>>
>>>>>>>>>> 1. mvn -PskipTests from root directory
>>>>>>>>>> 2. cd fit/core-reference
>>>>>>>>>> 3. mvn -Pdebug
>>>>>>>>>>
>>>>>>>>>> At this point you can point your browser to
>>>>>>>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>>>>>>>
>>>>>>>>>>> Or may be you can try and isolate where the problem is, 
>>>>>>>>>>> example,
>>>>>>>>>>> does
>>>>>>>>>>> it get generated for your env if only UserServiceImpl rest
>>>>>>>>>>> service is
>>>>>>>>>>> registered ?
>>>>>>>>>>
>>>>>>>>>> I'll try and let you know.
>>>>>>>>>>
>>>>>>>>>>> By the way I thought you had WADL prepared during a build 
>>>>>>>>>>> time ?
>>>>>>>>>>
>>>>>>>>>> In Syncope 1.2.X, WADL is made available at runtime and also
>>>>>>>>>> generated
>>>>>>>>>> at release time, for website publishing at
>>>>>>>>>>
>>>>>>>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>>>>>>>
>>>>>>>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>>>>>>>
>>>>>>>>>> Regards.
>>>>>>>>>>
>>>>>>>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>>>>>>>> Hi Francesco
>>>>>>>>>>>>
>>>>>>>>>>>> I wonder if it is related somehow to
>>>>>>>>>>>>
>>>>>>>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8 
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>>>>>>>
>>>>>>>>>>>> I'll have a look shortly, will try to reproduce with a
>>>>>>>>>>>> simlplified
>>>>>>>>>>>> version of
>>>>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java 
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> with its list() method only...
>>>>>>>>>>>>
>>>>>>>>>>>> Cheers, Sergey
>>>>>>>>>>>>
>>>>>>>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this 
>>>>>>>>>>>>> configuration
>>>>>>>>>>>>> [1] I
>>>>>>>>>>>>> get an empty
>>>>>>>>>>>>>
>>>>>>>>>>>>> <grammars/>
>>>>>>>>>>>>>
>>>>>>>>>>>>> element when accessing ?_wadl
>>>>>>>>>>>>>
>>>>>>>>>>>>> With 3.0.4 everything works, instead: any relevant
>>>>>>>>>>>>> configuration
>>>>>>>>>>>>> change?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> Regards.
>>>>>>>>>>>>>
>>>>>>>>>>>>> [1] 
>>>>>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89 
>>>>>>>>>>>>>

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Francesco

Good stuff, thanks for isolating the problem.
I'm not sure how to make it easier on the CXF side - I'll update the 
generator to log a warning (will make it into 3.1.1-SNAPSHOT though :-)) 
when a JAXBContext is null despite a number of JAXB class candidates 
being available - that should at least help to narrow down a problem a 
bit...

Thanks, Sergey

On 04/05/15 15:12, Francesco Chicchiriccò wrote:
> Problem solved: AbstractPolicyTO on master was missing a default no-arg
> contructor (which is actually not required because one has normally to
> instantiate one of its child classes).
> I've solved by adding a useless private constructor like as
>
>      private AbstractPolicyTO() {
>          throw new UnsupportedOperationException("No-arg constructor is
> just to keep JAXB from complaining");
>      }
>
> Now it works :-)
>
> Incidentally, I've also migrated to CXF 3.1.0-SNAPSHOT, waiting for
> upcoming release(s): all tests are green, cool :-)
>
> Regards.
>
> On 30/04/2015 14:45, Sergey Beryozkin wrote:
>> One thing is that AbstractPolicyTO is abstract, so may that is causing
>> a problem...
>>
>> Thanks, Sergey
>>
>> On 30/04/15 13:32, Sergey Beryozkin wrote:
>>> Hi Francesco,
>>> PolicyServiceImpl is the first one that causes issues. I've added only
>>> PolicyServiceImpl, this is a list of classes that JAXBContext is created
>>> from
>>>
>>> org.apache.syncope.common.lib.to.AbstractPolicyTO,
>>> org.apache.syncope.common.lib.to.PasswordPolicyTO,
>>> org.apache.syncope.common.lib.to.SyncPolicyTO,
>>> org.apache.syncope.common.lib.to.AccountPolicyTO]
>>>
>>> and JAXBContext is null (something in those classes is causing a
>>> JAXBContext creation failure) and therefore a grammar is empty...
>>>
>>> The code I've added few days back is not run. I'm cautiotiosuly
>>> optimistic that it is not a CXF issue...
>>>
>>> Can you please have a look at those 4 classes ? May be do a JAXBContext
>>> creation from them in a unit test ? I guess I might also configure the
>>> cargo plugin to pass a JAXB debug property, not sure how though :-)
>>>
>>> Thanks, Sergey
>>>
>>>
>>>
>>>
>>> On 30/04/15 11:43, Sergey Beryozkin wrote:
>>>> Indeed, can see it too with a single UserServiceImpl bean. Going to
>>>> narrow down now....
>>>>
>>>> Sergey
>>>> On 30/04/15 09:53, Francesco Chicchiriccò wrote:
>>>>> On 30/04/2015 10:46, Sergey Beryozkin wrote:
>>>>>> Hi Francesco,
>>>>>> np, I did not have a chance to test yesterday too, thanks for a test
>>>>>> on your end,
>>>>>>
>>>>>> I suspect a new type has been introduced in one of the other Syncope
>>>>>> services which is added to the collection of types for JAXBContext
>>>>>> and
>>>>>> the JAXB context creation fails.
>>>>>>
>>>>>> Can you please give me a favor and list all other beans explicitly, I
>>>>>> guess that will not work, and then we can check which service bean is
>>>>>> 'to blame' ? If you are busy with something else: then please type
>>>>>> the
>>>>>> complete list of beans in the jaxrs:endpoint - I'll have a look right
>>>>>> now then...
>>>>>
>>>>> Since it looks like a Syncope's issue, I can't pretend to stuck you on
>>>>> it! :-)
>>>>> I'll take a look at new types in 2.0.0 to see what is causing troubles
>>>>> to JAXB (maybe the easiest way is to run the live tests with
>>>>> application/xml - we still feature that).
>>>>> Thanks for your assistance.
>>>>>
>>>>> Anyway, the list of beans to be listed under jaxrs:endpoint is barely
>>>>> any non-abstract class under
>>>>>
>>>>> https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Regards.
>>>>>
>>>>>> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>>>>>>> Hi Sergey,
>>>>>>> sorry for late notice; I've tested two different configurations on
>>>>>>> master:
>>>>>>>
>>>>>>> 1. untouched configuration, CXF 3.0.4
>>>>>>>
>>>>>>> same situation, empty <grammars/>
>>>>>>>
>>>>>>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>>>>>>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>>>>>>
>>>>>>> Konsole output    <jaxrs:server id="restContainer" address="/"
>>>>>>> - basePackages="org.apache.syncope.common.rest.api.service,
>>>>>>> org.apache.syncope.core.rest.cxf.service"
>>>>>>>                   staticSubresourceResolution="true">
>>>>>>> +    <jaxrs:serviceBeans>
>>>>>>> +      <ref bean="userServiceImpl"/>
>>>>>>> +    </jaxrs:serviceBeans>
>>>>>>>
>>>>>>> e.g. configuring the sole UserService: I confirm it works, as in
>>>>>>> your
>>>>>>> case.
>>>>>>>
>>>>>>> Any hint of what I am doing wrong? Thanks.
>>>>>>>
>>>>>>> Regards.
>>>>>>>
>>>>>>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>>>>>>> I've built the master branch, will be looking the first thing
>>>>>>>> tomorrow
>>>>>>>> morning, should have time before a release...
>>>>>>>>
>>>>>>>> Thanks, Sergey
>>>>>>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>>>>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>>>>>>> Hi Francesco
>>>>>>>>>>
>>>>>>>>>> I've done a local test by copying UserService,
>>>>>>>>>> AbstractServiceImpl,
>>>>>>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>>>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping
>>>>>>>>>> there
>>>>>>>>>> are adapting PagedResult accordingly), and I'm seeing a schema
>>>>>>>>>> being
>>>>>>>>>> generated. I think the code I did few days ago is fine, it should
>>>>>>>>>> only
>>>>>>>>>> make the generation better, so I wonder where the problem is.
>>>>>>>>>>
>>>>>>>>>> Can you give me a favor and remind how can I run Syncope in a
>>>>>>>>>> debug
>>>>>>>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ?
>>>>>>>>>> this
>>>>>>>>>
>>>>>>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>>>>>>> slightly different than before - you need to
>>>>>>>>>
>>>>>>>>> 1. mvn -PskipTests from root directory
>>>>>>>>> 2. cd fit/core-reference
>>>>>>>>> 3. mvn -Pdebug
>>>>>>>>>
>>>>>>>>> At this point you can point your browser to
>>>>>>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>>>>>>
>>>>>>>>>> Or may be you can try and isolate where the problem is, example,
>>>>>>>>>> does
>>>>>>>>>> it get generated for your env if only UserServiceImpl rest
>>>>>>>>>> service is
>>>>>>>>>> registered ?
>>>>>>>>>
>>>>>>>>> I'll try and let you know.
>>>>>>>>>
>>>>>>>>>> By the way I thought you had WADL prepared during a build time ?
>>>>>>>>>
>>>>>>>>> In Syncope 1.2.X, WADL is made available at runtime and also
>>>>>>>>> generated
>>>>>>>>> at release time, for website publishing at
>>>>>>>>>
>>>>>>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>>>>>>
>>>>>>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>>>>>>
>>>>>>>>> Regards.
>>>>>>>>>
>>>>>>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>>>>>>> Hi Francesco
>>>>>>>>>>>
>>>>>>>>>>> I wonder if it is related somehow to
>>>>>>>>>>>
>>>>>>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>>>>>>
>>>>>>>>>>> I'll have a look shortly, will try to reproduce with a
>>>>>>>>>>> simlplified
>>>>>>>>>>> version of
>>>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> with its list() method only...
>>>>>>>>>>>
>>>>>>>>>>> Cheers, Sergey
>>>>>>>>>>>
>>>>>>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration
>>>>>>>>>>>> [1] I
>>>>>>>>>>>> get an empty
>>>>>>>>>>>>
>>>>>>>>>>>> <grammars/>
>>>>>>>>>>>>
>>>>>>>>>>>> element when accessing ?_wadl
>>>>>>>>>>>>
>>>>>>>>>>>> With 3.0.4 everything works, instead: any relevant
>>>>>>>>>>>> configuration
>>>>>>>>>>>> change?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Regards.
>>>>>>>>>>>>
>>>>>>>>>>>> [1]
>>>>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>>>>>>>>>
>


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Francesco Chicchiriccò <il...@apache.org>.
Problem solved: AbstractPolicyTO on master was missing a default no-arg 
contructor (which is actually not required because one has normally to 
instantiate one of its child classes).
I've solved by adding a useless private constructor like as

     private AbstractPolicyTO() {
         throw new UnsupportedOperationException("No-arg constructor is 
just to keep JAXB from complaining");
     }

Now it works :-)

Incidentally, I've also migrated to CXF 3.1.0-SNAPSHOT, waiting for 
upcoming release(s): all tests are green, cool :-)

Regards.

On 30/04/2015 14:45, Sergey Beryozkin wrote:
> One thing is that AbstractPolicyTO is abstract, so may that is causing 
> a problem...
>
> Thanks, Sergey
>
> On 30/04/15 13:32, Sergey Beryozkin wrote:
>> Hi Francesco,
>> PolicyServiceImpl is the first one that causes issues. I've added only
>> PolicyServiceImpl, this is a list of classes that JAXBContext is created
>> from
>>
>> org.apache.syncope.common.lib.to.AbstractPolicyTO,
>> org.apache.syncope.common.lib.to.PasswordPolicyTO,
>> org.apache.syncope.common.lib.to.SyncPolicyTO,
>> org.apache.syncope.common.lib.to.AccountPolicyTO]
>>
>> and JAXBContext is null (something in those classes is causing a
>> JAXBContext creation failure) and therefore a grammar is empty...
>>
>> The code I've added few days back is not run. I'm cautiotiosuly
>> optimistic that it is not a CXF issue...
>>
>> Can you please have a look at those 4 classes ? May be do a JAXBContext
>> creation from them in a unit test ? I guess I might also configure the
>> cargo plugin to pass a JAXB debug property, not sure how though :-)
>>
>> Thanks, Sergey
>>
>>
>>
>>
>> On 30/04/15 11:43, Sergey Beryozkin wrote:
>>> Indeed, can see it too with a single UserServiceImpl bean. Going to
>>> narrow down now....
>>>
>>> Sergey
>>> On 30/04/15 09:53, Francesco Chicchiriccò wrote:
>>>> On 30/04/2015 10:46, Sergey Beryozkin wrote:
>>>>> Hi Francesco,
>>>>> np, I did not have a chance to test yesterday too, thanks for a test
>>>>> on your end,
>>>>>
>>>>> I suspect a new type has been introduced in one of the other Syncope
>>>>> services which is added to the collection of types for JAXBContext 
>>>>> and
>>>>> the JAXB context creation fails.
>>>>>
>>>>> Can you please give me a favor and list all other beans explicitly, I
>>>>> guess that will not work, and then we can check which service bean is
>>>>> 'to blame' ? If you are busy with something else: then please type 
>>>>> the
>>>>> complete list of beans in the jaxrs:endpoint - I'll have a look right
>>>>> now then...
>>>>
>>>> Since it looks like a Syncope's issue, I can't pretend to stuck you on
>>>> it! :-)
>>>> I'll take a look at new types in 2.0.0 to see what is causing troubles
>>>> to JAXB (maybe the easiest way is to run the live tests with
>>>> application/xml - we still feature that).
>>>> Thanks for your assistance.
>>>>
>>>> Anyway, the list of beans to be listed under jaxrs:endpoint is barely
>>>> any non-abstract class under
>>>>
>>>> https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service 
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Regards.
>>>>
>>>>> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>>>>>> Hi Sergey,
>>>>>> sorry for late notice; I've tested two different configurations on
>>>>>> master:
>>>>>>
>>>>>> 1. untouched configuration, CXF 3.0.4
>>>>>>
>>>>>> same situation, empty <grammars/>
>>>>>>
>>>>>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>>>>>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>>>>>
>>>>>> Konsole output    <jaxrs:server id="restContainer" address="/"
>>>>>> - basePackages="org.apache.syncope.common.rest.api.service,
>>>>>> org.apache.syncope.core.rest.cxf.service"
>>>>>>                   staticSubresourceResolution="true">
>>>>>> +    <jaxrs:serviceBeans>
>>>>>> +      <ref bean="userServiceImpl"/>
>>>>>> +    </jaxrs:serviceBeans>
>>>>>>
>>>>>> e.g. configuring the sole UserService: I confirm it works, as in 
>>>>>> your
>>>>>> case.
>>>>>>
>>>>>> Any hint of what I am doing wrong? Thanks.
>>>>>>
>>>>>> Regards.
>>>>>>
>>>>>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>>>>>> I've built the master branch, will be looking the first thing
>>>>>>> tomorrow
>>>>>>> morning, should have time before a release...
>>>>>>>
>>>>>>> Thanks, Sergey
>>>>>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>>>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>>>>>> Hi Francesco
>>>>>>>>>
>>>>>>>>> I've done a local test by copying UserService, 
>>>>>>>>> AbstractServiceImpl,
>>>>>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping
>>>>>>>>> there
>>>>>>>>> are adapting PagedResult accordingly), and I'm seeing a schema
>>>>>>>>> being
>>>>>>>>> generated. I think the code I did few days ago is fine, it should
>>>>>>>>> only
>>>>>>>>> make the generation better, so I wonder where the problem is.
>>>>>>>>>
>>>>>>>>> Can you give me a favor and remind how can I run Syncope in a 
>>>>>>>>> debug
>>>>>>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ?
>>>>>>>>> this
>>>>>>>>
>>>>>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>>>>>> slightly different than before - you need to
>>>>>>>>
>>>>>>>> 1. mvn -PskipTests from root directory
>>>>>>>> 2. cd fit/core-reference
>>>>>>>> 3. mvn -Pdebug
>>>>>>>>
>>>>>>>> At this point you can point your browser to
>>>>>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>>>>>
>>>>>>>>> Or may be you can try and isolate where the problem is, example,
>>>>>>>>> does
>>>>>>>>> it get generated for your env if only UserServiceImpl rest
>>>>>>>>> service is
>>>>>>>>> registered ?
>>>>>>>>
>>>>>>>> I'll try and let you know.
>>>>>>>>
>>>>>>>>> By the way I thought you had WADL prepared during a build time ?
>>>>>>>>
>>>>>>>> In Syncope 1.2.X, WADL is made available at runtime and also
>>>>>>>> generated
>>>>>>>> at release time, for website publishing at
>>>>>>>>
>>>>>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>>>>>
>>>>>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>>>>>
>>>>>>>> Regards.
>>>>>>>>
>>>>>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>>>>>> Hi Francesco
>>>>>>>>>>
>>>>>>>>>> I wonder if it is related somehow to
>>>>>>>>>>
>>>>>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8 
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>>>>>
>>>>>>>>>> I'll have a look shortly, will try to reproduce with a 
>>>>>>>>>> simlplified
>>>>>>>>>> version of
>>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java 
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> with its list() method only...
>>>>>>>>>>
>>>>>>>>>> Cheers, Sergey
>>>>>>>>>>
>>>>>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration
>>>>>>>>>>> [1] I
>>>>>>>>>>> get an empty
>>>>>>>>>>>
>>>>>>>>>>> <grammars/>
>>>>>>>>>>>
>>>>>>>>>>> element when accessing ?_wadl
>>>>>>>>>>>
>>>>>>>>>>> With 3.0.4 everything works, instead: any relevant 
>>>>>>>>>>> configuration
>>>>>>>>>>> change?
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Regards.
>>>>>>>>>>>
>>>>>>>>>>> [1] 
>>>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89 
>>>>>>>>>>>

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/



Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
One thing is that AbstractPolicyTO is abstract, so may that is causing a 
problem...

Thanks, Sergey

On 30/04/15 13:32, Sergey Beryozkin wrote:
> Hi Francesco,
> PolicyServiceImpl is the first one that causes issues. I've added only
> PolicyServiceImpl, this is a list of classes that JAXBContext is created
> from
>
> org.apache.syncope.common.lib.to.AbstractPolicyTO,
> org.apache.syncope.common.lib.to.PasswordPolicyTO,
> org.apache.syncope.common.lib.to.SyncPolicyTO,
> org.apache.syncope.common.lib.to.AccountPolicyTO]
>
> and JAXBContext is null (something in those classes is causing a
> JAXBContext creation failure) and therefore a grammar is empty...
>
> The code I've added few days back is not run. I'm cautiotiosuly
> optimistic that it is not a CXF issue...
>
> Can you please have a look at those 4 classes ? May be do a JAXBContext
> creation from them in a unit test ? I guess I might also configure the
> cargo plugin to pass a JAXB debug property, not sure how though :-)
>
> Thanks, Sergey
>
>
>
>
> On 30/04/15 11:43, Sergey Beryozkin wrote:
>> Indeed, can see it too with a single UserServiceImpl bean. Going to
>> narrow down now....
>>
>> Sergey
>> On 30/04/15 09:53, Francesco Chicchiriccò wrote:
>>> On 30/04/2015 10:46, Sergey Beryozkin wrote:
>>>> Hi Francesco,
>>>> np, I did not have a chance to test yesterday too, thanks for a test
>>>> on your end,
>>>>
>>>> I suspect a new type has been introduced in one of the other Syncope
>>>> services which is added to the collection of types for JAXBContext and
>>>> the JAXB context creation fails.
>>>>
>>>> Can you please give me a favor and list all other beans explicitly, I
>>>> guess that will not work, and then we can check which service bean is
>>>> 'to blame' ? If you are busy with something else: then please type the
>>>> complete list of beans in the jaxrs:endpoint - I'll have a look right
>>>> now then...
>>>
>>> Since it looks like a Syncope's issue, I can't pretend to stuck you on
>>> it! :-)
>>> I'll take a look at new types in 2.0.0 to see what is causing troubles
>>> to JAXB (maybe the easiest way is to run the live tests with
>>> application/xml - we still feature that).
>>> Thanks for your assistance.
>>>
>>> Anyway, the list of beans to be listed under jaxrs:endpoint is barely
>>> any non-abstract class under
>>>
>>> https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service
>>>
>>>
>>>
>>>
>>> Regards.
>>>
>>>> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>>>>> Hi Sergey,
>>>>> sorry for late notice; I've tested two different configurations on
>>>>> master:
>>>>>
>>>>> 1. untouched configuration, CXF 3.0.4
>>>>>
>>>>> same situation, empty <grammars/>
>>>>>
>>>>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>>>>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>>>>
>>>>> Konsole output    <jaxrs:server id="restContainer" address="/"
>>>>> - basePackages="org.apache.syncope.common.rest.api.service,
>>>>> org.apache.syncope.core.rest.cxf.service"
>>>>>                   staticSubresourceResolution="true">
>>>>> +    <jaxrs:serviceBeans>
>>>>> +      <ref bean="userServiceImpl"/>
>>>>> +    </jaxrs:serviceBeans>
>>>>>
>>>>> e.g. configuring the sole UserService: I confirm it works, as in your
>>>>> case.
>>>>>
>>>>> Any hint of what I am doing wrong? Thanks.
>>>>>
>>>>> Regards.
>>>>>
>>>>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>>>>> I've built the master branch, will be looking the first thing
>>>>>> tomorrow
>>>>>> morning, should have time before a release...
>>>>>>
>>>>>> Thanks, Sergey
>>>>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>>>>> Hi Francesco
>>>>>>>>
>>>>>>>> I've done a local test by copying UserService, AbstractServiceImpl,
>>>>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping
>>>>>>>> there
>>>>>>>> are adapting PagedResult accordingly), and I'm seeing a schema
>>>>>>>> being
>>>>>>>> generated. I think the code I did few days ago is fine, it should
>>>>>>>> only
>>>>>>>> make the generation better, so I wonder where the problem is.
>>>>>>>>
>>>>>>>> Can you give me a favor and remind how can I run Syncope in a debug
>>>>>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ?
>>>>>>>> this
>>>>>>>
>>>>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>>>>> slightly different than before - you need to
>>>>>>>
>>>>>>> 1. mvn -PskipTests from root directory
>>>>>>> 2. cd fit/core-reference
>>>>>>> 3. mvn -Pdebug
>>>>>>>
>>>>>>> At this point you can point your browser to
>>>>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>>>>
>>>>>>>> Or may be you can try and isolate where the problem is, example,
>>>>>>>> does
>>>>>>>> it get generated for your env if only UserServiceImpl rest
>>>>>>>> service is
>>>>>>>> registered ?
>>>>>>>
>>>>>>> I'll try and let you know.
>>>>>>>
>>>>>>>> By the way I thought you had WADL prepared during a build time ?
>>>>>>>
>>>>>>> In Syncope 1.2.X, WADL is made available at runtime and also
>>>>>>> generated
>>>>>>> at release time, for website publishing at
>>>>>>>
>>>>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>>>>
>>>>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>>>>
>>>>>>> Regards.
>>>>>>>
>>>>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>>>>> Hi Francesco
>>>>>>>>>
>>>>>>>>> I wonder if it is related somehow to
>>>>>>>>>
>>>>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>>>>
>>>>>>>>> I'll have a look shortly, will try to reproduce with a simlplified
>>>>>>>>> version of
>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> with its list() method only...
>>>>>>>>>
>>>>>>>>> Cheers, Sergey
>>>>>>>>>
>>>>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>>>>> Hi,
>>>>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration
>>>>>>>>>> [1] I
>>>>>>>>>> get an empty
>>>>>>>>>>
>>>>>>>>>> <grammars/>
>>>>>>>>>>
>>>>>>>>>> element when accessing ?_wadl
>>>>>>>>>>
>>>>>>>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>>>>>>>> change?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Regards.
>>>>>>>>>>
>>>>>>>>>> [1]
>>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>
>>
>>
>


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Francesco,
PolicyServiceImpl is the first one that causes issues. I've added only 
PolicyServiceImpl, this is a list of classes that JAXBContext is created 
from

org.apache.syncope.common.lib.to.AbstractPolicyTO, 
org.apache.syncope.common.lib.to.PasswordPolicyTO,
org.apache.syncope.common.lib.to.SyncPolicyTO,
org.apache.syncope.common.lib.to.AccountPolicyTO]

and JAXBContext is null (something in those classes is causing a 
JAXBContext creation failure) and therefore a grammar is empty...

The code I've added few days back is not run. I'm cautiotiosuly 
optimistic that it is not a CXF issue...

Can you please have a look at those 4 classes ? May be do a JAXBContext 
creation from them in a unit test ? I guess I might also configure the 
cargo plugin to pass a JAXB debug property, not sure how though :-)

Thanks, Sergey




On 30/04/15 11:43, Sergey Beryozkin wrote:
> Indeed, can see it too with a single UserServiceImpl bean. Going to
> narrow down now....
>
> Sergey
> On 30/04/15 09:53, Francesco Chicchiriccò wrote:
>> On 30/04/2015 10:46, Sergey Beryozkin wrote:
>>> Hi Francesco,
>>> np, I did not have a chance to test yesterday too, thanks for a test
>>> on your end,
>>>
>>> I suspect a new type has been introduced in one of the other Syncope
>>> services which is added to the collection of types for JAXBContext and
>>> the JAXB context creation fails.
>>>
>>> Can you please give me a favor and list all other beans explicitly, I
>>> guess that will not work, and then we can check which service bean is
>>> 'to blame' ? If you are busy with something else: then please type the
>>> complete list of beans in the jaxrs:endpoint - I'll have a look right
>>> now then...
>>
>> Since it looks like a Syncope's issue, I can't pretend to stuck you on
>> it! :-)
>> I'll take a look at new types in 2.0.0 to see what is causing troubles
>> to JAXB (maybe the easiest way is to run the live tests with
>> application/xml - we still feature that).
>> Thanks for your assistance.
>>
>> Anyway, the list of beans to be listed under jaxrs:endpoint is barely
>> any non-abstract class under
>>
>> https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service
>>
>>
>>
>> Regards.
>>
>>> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>>>> Hi Sergey,
>>>> sorry for late notice; I've tested two different configurations on
>>>> master:
>>>>
>>>> 1. untouched configuration, CXF 3.0.4
>>>>
>>>> same situation, empty <grammars/>
>>>>
>>>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>>>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>>>
>>>> Konsole output    <jaxrs:server id="restContainer" address="/"
>>>> - basePackages="org.apache.syncope.common.rest.api.service,
>>>> org.apache.syncope.core.rest.cxf.service"
>>>>                   staticSubresourceResolution="true">
>>>> +    <jaxrs:serviceBeans>
>>>> +      <ref bean="userServiceImpl"/>
>>>> +    </jaxrs:serviceBeans>
>>>>
>>>> e.g. configuring the sole UserService: I confirm it works, as in your
>>>> case.
>>>>
>>>> Any hint of what I am doing wrong? Thanks.
>>>>
>>>> Regards.
>>>>
>>>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>>>> I've built the master branch, will be looking the first thing tomorrow
>>>>> morning, should have time before a release...
>>>>>
>>>>> Thanks, Sergey
>>>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>>>> Hi Francesco
>>>>>>>
>>>>>>> I've done a local test by copying UserService, AbstractServiceImpl,
>>>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping
>>>>>>> there
>>>>>>> are adapting PagedResult accordingly), and I'm seeing a schema being
>>>>>>> generated. I think the code I did few days ago is fine, it should
>>>>>>> only
>>>>>>> make the generation better, so I wonder where the problem is.
>>>>>>>
>>>>>>> Can you give me a favor and remind how can I run Syncope in a debug
>>>>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ?
>>>>>>> this
>>>>>>
>>>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>>>> slightly different than before - you need to
>>>>>>
>>>>>> 1. mvn -PskipTests from root directory
>>>>>> 2. cd fit/core-reference
>>>>>> 3. mvn -Pdebug
>>>>>>
>>>>>> At this point you can point your browser to
>>>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>>>
>>>>>>> Or may be you can try and isolate where the problem is, example,
>>>>>>> does
>>>>>>> it get generated for your env if only UserServiceImpl rest
>>>>>>> service is
>>>>>>> registered ?
>>>>>>
>>>>>> I'll try and let you know.
>>>>>>
>>>>>>> By the way I thought you had WADL prepared during a build time ?
>>>>>>
>>>>>> In Syncope 1.2.X, WADL is made available at runtime and also
>>>>>> generated
>>>>>> at release time, for website publishing at
>>>>>>
>>>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>>>
>>>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>>>
>>>>>> Regards.
>>>>>>
>>>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>>>> Hi Francesco
>>>>>>>>
>>>>>>>> I wonder if it is related somehow to
>>>>>>>>
>>>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>>>
>>>>>>>> I'll have a look shortly, will try to reproduce with a simlplified
>>>>>>>> version of
>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> with its list() method only...
>>>>>>>>
>>>>>>>> Cheers, Sergey
>>>>>>>>
>>>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>>>> Hi,
>>>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration
>>>>>>>>> [1] I
>>>>>>>>> get an empty
>>>>>>>>>
>>>>>>>>> <grammars/>
>>>>>>>>>
>>>>>>>>> element when accessing ?_wadl
>>>>>>>>>
>>>>>>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>>>>>>> change?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Regards.
>>>>>>>>>
>>>>>>>>> [1]
>>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>>>>>>
>>>>>>>>>
>>>
>
>


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
Indeed, can see it too with a single UserServiceImpl bean. Going to 
narrow down now....

Sergey
On 30/04/15 09:53, Francesco Chicchiriccò wrote:
> On 30/04/2015 10:46, Sergey Beryozkin wrote:
>> Hi Francesco,
>> np, I did not have a chance to test yesterday too, thanks for a test
>> on your end,
>>
>> I suspect a new type has been introduced in one of the other Syncope
>> services which is added to the collection of types for JAXBContext and
>> the JAXB context creation fails.
>>
>> Can you please give me a favor and list all other beans explicitly, I
>> guess that will not work, and then we can check which service bean is
>> 'to blame' ? If you are busy with something else: then please type the
>> complete list of beans in the jaxrs:endpoint - I'll have a look right
>> now then...
>
> Since it looks like a Syncope's issue, I can't pretend to stuck you on
> it! :-)
> I'll take a look at new types in 2.0.0 to see what is causing troubles
> to JAXB (maybe the easiest way is to run the live tests with
> application/xml - we still feature that).
> Thanks for your assistance.
>
> Anyway, the list of beans to be listed under jaxrs:endpoint is barely
> any non-abstract class under
>
> https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service
>
>
> Regards.
>
>> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>>> Hi Sergey,
>>> sorry for late notice; I've tested two different configurations on
>>> master:
>>>
>>> 1. untouched configuration, CXF 3.0.4
>>>
>>> same situation, empty <grammars/>
>>>
>>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>>
>>> Konsole output    <jaxrs:server id="restContainer" address="/"
>>> - basePackages="org.apache.syncope.common.rest.api.service,
>>> org.apache.syncope.core.rest.cxf.service"
>>>                   staticSubresourceResolution="true">
>>> +    <jaxrs:serviceBeans>
>>> +      <ref bean="userServiceImpl"/>
>>> +    </jaxrs:serviceBeans>
>>>
>>> e.g. configuring the sole UserService: I confirm it works, as in your
>>> case.
>>>
>>> Any hint of what I am doing wrong? Thanks.
>>>
>>> Regards.
>>>
>>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>>> I've built the master branch, will be looking the first thing tomorrow
>>>> morning, should have time before a release...
>>>>
>>>> Thanks, Sergey
>>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>>> Hi Francesco
>>>>>>
>>>>>> I've done a local test by copying UserService, AbstractServiceImpl,
>>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping
>>>>>> there
>>>>>> are adapting PagedResult accordingly), and I'm seeing a schema being
>>>>>> generated. I think the code I did few days ago is fine, it should
>>>>>> only
>>>>>> make the generation better, so I wonder where the problem is.
>>>>>>
>>>>>> Can you give me a favor and remind how can I run Syncope in a debug
>>>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ?
>>>>>> this
>>>>>
>>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>>> slightly different than before - you need to
>>>>>
>>>>> 1. mvn -PskipTests from root directory
>>>>> 2. cd fit/core-reference
>>>>> 3. mvn -Pdebug
>>>>>
>>>>> At this point you can point your browser to
>>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>>
>>>>>> Or may be you can try and isolate where the problem is, example, does
>>>>>> it get generated for your env if only UserServiceImpl rest service is
>>>>>> registered ?
>>>>>
>>>>> I'll try and let you know.
>>>>>
>>>>>> By the way I thought you had WADL prepared during a build time ?
>>>>>
>>>>> In Syncope 1.2.X, WADL is made available at runtime and also generated
>>>>> at release time, for website publishing at
>>>>>
>>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>>
>>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>>
>>>>> Regards.
>>>>>
>>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>>> Hi Francesco
>>>>>>>
>>>>>>> I wonder if it is related somehow to
>>>>>>>
>>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>>
>>>>>>> I'll have a look shortly, will try to reproduce with a simlplified
>>>>>>> version of
>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> with its list() method only...
>>>>>>>
>>>>>>> Cheers, Sergey
>>>>>>>
>>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>>> Hi,
>>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration
>>>>>>>> [1] I
>>>>>>>> get an empty
>>>>>>>>
>>>>>>>> <grammars/>
>>>>>>>>
>>>>>>>> element when accessing ?_wadl
>>>>>>>>
>>>>>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>>>>>> change?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Regards.
>>>>>>>>
>>>>>>>> [1]
>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>>>>>
>>


-- 
Sergey Beryozkin

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

Blog: http://sberyozkin.blogspot.com

Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
HI Francesco - I'll check on my end too - may be a CXF issue still
Sergey
On 30/04/15 09:53, Francesco Chicchiriccò wrote:
> On 30/04/2015 10:46, Sergey Beryozkin wrote:
>> Hi Francesco,
>> np, I did not have a chance to test yesterday too, thanks for a test
>> on your end,
>>
>> I suspect a new type has been introduced in one of the other Syncope
>> services which is added to the collection of types for JAXBContext and
>> the JAXB context creation fails.
>>
>> Can you please give me a favor and list all other beans explicitly, I
>> guess that will not work, and then we can check which service bean is
>> 'to blame' ? If you are busy with something else: then please type the
>> complete list of beans in the jaxrs:endpoint - I'll have a look right
>> now then...
>
> Since it looks like a Syncope's issue, I can't pretend to stuck you on
> it! :-)
> I'll take a look at new types in 2.0.0 to see what is causing troubles
> to JAXB (maybe the easiest way is to run the live tests with
> application/xml - we still feature that).
> Thanks for your assistance.
>
> Anyway, the list of beans to be listed under jaxrs:endpoint is barely
> any non-abstract class under
>
> https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service
>
>
> Regards.
>
>> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>>> Hi Sergey,
>>> sorry for late notice; I've tested two different configurations on
>>> master:
>>>
>>> 1. untouched configuration, CXF 3.0.4
>>>
>>> same situation, empty <grammars/>
>>>
>>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>>
>>> Konsole output    <jaxrs:server id="restContainer" address="/"
>>> - basePackages="org.apache.syncope.common.rest.api.service,
>>> org.apache.syncope.core.rest.cxf.service"
>>>                   staticSubresourceResolution="true">
>>> +    <jaxrs:serviceBeans>
>>> +      <ref bean="userServiceImpl"/>
>>> +    </jaxrs:serviceBeans>
>>>
>>> e.g. configuring the sole UserService: I confirm it works, as in your
>>> case.
>>>
>>> Any hint of what I am doing wrong? Thanks.
>>>
>>> Regards.
>>>
>>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>>> I've built the master branch, will be looking the first thing tomorrow
>>>> morning, should have time before a release...
>>>>
>>>> Thanks, Sergey
>>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>>> Hi Francesco
>>>>>>
>>>>>> I've done a local test by copying UserService, AbstractServiceImpl,
>>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping
>>>>>> there
>>>>>> are adapting PagedResult accordingly), and I'm seeing a schema being
>>>>>> generated. I think the code I did few days ago is fine, it should
>>>>>> only
>>>>>> make the generation better, so I wonder where the problem is.
>>>>>>
>>>>>> Can you give me a favor and remind how can I run Syncope in a debug
>>>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ?
>>>>>> this
>>>>>
>>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>>> slightly different than before - you need to
>>>>>
>>>>> 1. mvn -PskipTests from root directory
>>>>> 2. cd fit/core-reference
>>>>> 3. mvn -Pdebug
>>>>>
>>>>> At this point you can point your browser to
>>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>>
>>>>>> Or may be you can try and isolate where the problem is, example, does
>>>>>> it get generated for your env if only UserServiceImpl rest service is
>>>>>> registered ?
>>>>>
>>>>> I'll try and let you know.
>>>>>
>>>>>> By the way I thought you had WADL prepared during a build time ?
>>>>>
>>>>> In Syncope 1.2.X, WADL is made available at runtime and also generated
>>>>> at release time, for website publishing at
>>>>>
>>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>>
>>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>>
>>>>> Regards.
>>>>>
>>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>>> Hi Francesco
>>>>>>>
>>>>>>> I wonder if it is related somehow to
>>>>>>>
>>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>>
>>>>>>> I'll have a look shortly, will try to reproduce with a simlplified
>>>>>>> version of
>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> with its list() method only...
>>>>>>>
>>>>>>> Cheers, Sergey
>>>>>>>
>>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>>> Hi,
>>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration
>>>>>>>> [1] I
>>>>>>>> get an empty
>>>>>>>>
>>>>>>>> <grammars/>
>>>>>>>>
>>>>>>>> element when accessing ?_wadl
>>>>>>>>
>>>>>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>>>>>> change?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Regards.
>>>>>>>>
>>>>>>>> [1]
>>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>>>>>
>>


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 30/04/2015 10:46, Sergey Beryozkin wrote:
> Hi Francesco,
> np, I did not have a chance to test yesterday too, thanks for a test 
> on your end,
>
> I suspect a new type has been introduced in one of the other Syncope 
> services which is added to the collection of types for JAXBContext and 
> the JAXB context creation fails.
>
> Can you please give me a favor and list all other beans explicitly, I 
> guess that will not work, and then we can check which service bean is 
> 'to blame' ? If you are busy with something else: then please type the 
> complete list of beans in the jaxrs:endpoint - I'll have a look right 
> now then...

Since it looks like a Syncope's issue, I can't pretend to stuck you on 
it! :-)
I'll take a look at new types in 2.0.0 to see what is causing troubles 
to JAXB (maybe the easiest way is to run the live tests with 
application/xml - we still feature that).
Thanks for your assistance.

Anyway, the list of beans to be listed under jaxrs:endpoint is barely 
any non-abstract class under

https://github.com/apache/syncope/tree/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service

Regards.

> On 30/04/15 09:06, Francesco Chicchiriccò wrote:
>> Hi Sergey,
>> sorry for late notice; I've tested two different configurations on 
>> master:
>>
>> 1. untouched configuration, CXF 3.0.4
>>
>> same situation, empty <grammars/>
>>
>> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
>> core/rest-cxf/src/main/resources/restCXFContext.xml
>>
>> Konsole output    <jaxrs:server id="restContainer" address="/"
>> - basePackages="org.apache.syncope.common.rest.api.service,
>> org.apache.syncope.core.rest.cxf.service"
>>                   staticSubresourceResolution="true">
>> +    <jaxrs:serviceBeans>
>> +      <ref bean="userServiceImpl"/>
>> +    </jaxrs:serviceBeans>
>>
>> e.g. configuring the sole UserService: I confirm it works, as in your 
>> case.
>>
>> Any hint of what I am doing wrong? Thanks.
>>
>> Regards.
>>
>> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>>> I've built the master branch, will be looking the first thing tomorrow
>>> morning, should have time before a release...
>>>
>>> Thanks, Sergey
>>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>>> Hi Francesco
>>>>>
>>>>> I've done a local test by copying UserService, AbstractServiceImpl,
>>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping 
>>>>> there
>>>>> are adapting PagedResult accordingly), and I'm seeing a schema being
>>>>> generated. I think the code I did few days ago is fine, it should 
>>>>> only
>>>>> make the generation better, so I wonder where the problem is.
>>>>>
>>>>> Can you give me a favor and remind how can I run Syncope in a debug
>>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ? 
>>>>> this
>>>>
>>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>>> slightly different than before - you need to
>>>>
>>>> 1. mvn -PskipTests from root directory
>>>> 2. cd fit/core-reference
>>>> 3. mvn -Pdebug
>>>>
>>>> At this point you can point your browser to
>>>> http://localhost:9080/syncope/rest/?_wadl
>>>>
>>>>> Or may be you can try and isolate where the problem is, example, does
>>>>> it get generated for your env if only UserServiceImpl rest service is
>>>>> registered ?
>>>>
>>>> I'll try and let you know.
>>>>
>>>>> By the way I thought you had WADL prepared during a build time ?
>>>>
>>>> In Syncope 1.2.X, WADL is made available at runtime and also generated
>>>> at release time, for website publishing at
>>>>
>>>> http://syncope.apache.org/rest/1.2/index.html
>>>>
>>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>>
>>>> Regards.
>>>>
>>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>>> Hi Francesco
>>>>>>
>>>>>> I wonder if it is related somehow to
>>>>>>
>>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8 
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>>
>>>>>> I'll have a look shortly, will try to reproduce with a simlplified
>>>>>> version of
>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java 
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> with its list() method only...
>>>>>>
>>>>>> Cheers, Sergey
>>>>>>
>>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>>> Hi,
>>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration 
>>>>>>> [1] I
>>>>>>> get an empty
>>>>>>>
>>>>>>> <grammars/>
>>>>>>>
>>>>>>> element when accessing ?_wadl
>>>>>>>
>>>>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>>>>> change?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Regards.
>>>>>>>
>>>>>>> [1] 
>>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Francesco,
np, I did not have a chance to test yesterday too, thanks for a test on 
your end,

I suspect a new type has been introduced in one of the other Syncope 
services which is added to the collection of types for JAXBContext and 
the JAXB context creation fails.

Can you please give me a favor and list all other beans explicitly, I 
guess that will not work, and then we can check which service bean is 
'to blame' ? If you are busy with something else: then please type the 
complete list of beans in the jaxrs:endpoint - I'll have a look right 
now then...

Sergey



On 30/04/15 09:06, Francesco Chicchiriccò wrote:
> Hi Sergey,
> sorry for late notice; I've tested two different configurations on master:
>
> 1. untouched configuration, CXF 3.0.4
>
> same situation, empty <grammars/>
>
> 2. CXF 3.0.5-SNAPSHOT, applying this patch to
> core/rest-cxf/src/main/resources/restCXFContext.xml
>
> Konsole output    <jaxrs:server id="restContainer" address="/"
> - basePackages="org.apache.syncope.common.rest.api.service,
> org.apache.syncope.core.rest.cxf.service"
>                   staticSubresourceResolution="true">
> +    <jaxrs:serviceBeans>
> +      <ref bean="userServiceImpl"/>
> +    </jaxrs:serviceBeans>
>
> e.g. configuring the sole UserService: I confirm it works, as in your case.
>
> Any hint of what I am doing wrong? Thanks.
>
> Regards.
>
> On 29/04/2015 18:48, Sergey Beryozkin wrote:
>> I've built the master branch, will be looking the first thing tomorrow
>> morning, should have time before a release...
>>
>> Thanks, Sergey
>> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>>> Hi Francesco
>>>>
>>>> I've done a local test by copying UserService, AbstractServiceImpl,
>>>> UserServiceImpl and keeping read() and list() methods, and also
>>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping there
>>>> are adapting PagedResult accordingly), and I'm seeing a schema being
>>>> generated. I think the code I did few days ago is fine, it should only
>>>> make the generation better, so I wonder where the problem is.
>>>>
>>>> Can you give me a favor and remind how can I run Syncope in a debug
>>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ? this
>>>
>>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>>> slightly different than before - you need to
>>>
>>> 1. mvn -PskipTests from root directory
>>> 2. cd fit/core-reference
>>> 3. mvn -Pdebug
>>>
>>> At this point you can point your browser to
>>> http://localhost:9080/syncope/rest/?_wadl
>>>
>>>> Or may be you can try and isolate where the problem is, example, does
>>>> it get generated for your env if only UserServiceImpl rest service is
>>>> registered ?
>>>
>>> I'll try and let you know.
>>>
>>>> By the way I thought you had WADL prepared during a build time ?
>>>
>>> In Syncope 1.2.X, WADL is made available at runtime and also generated
>>> at release time, for website publishing at
>>>
>>> http://syncope.apache.org/rest/1.2/index.html
>>>
>>> In Syncope 2.0.0 we still need to port this latter feature.
>>>
>>> Regards.
>>>
>>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>>> Hi Francesco
>>>>>
>>>>> I wonder if it is related somehow to
>>>>>
>>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I did few days back. Though I'm not immediately seeing how.
>>>>>
>>>>> I'll have a look shortly, will try to reproduce with a simlplified
>>>>> version of
>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> with its list() method only...
>>>>>
>>>>> Cheers, Sergey
>>>>>
>>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>>> Hi,
>>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration [1] I
>>>>>> get an empty
>>>>>>
>>>>>> <grammars/>
>>>>>>
>>>>>> element when accessing ?_wadl
>>>>>>
>>>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>>>> change?
>>>>>>
>>>>>> Thanks,
>>>>>> Regards.
>>>>>>
>>>>>> [1]
>>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>>>
>>>>>>


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi Sergey,
sorry for late notice; I've tested two different configurations on master:

1. untouched configuration, CXF 3.0.4

same situation, empty <grammars/>

2. CXF 3.0.5-SNAPSHOT, applying this patch to 
core/rest-cxf/src/main/resources/restCXFContext.xml

Konsole output    <jaxrs:server id="restContainer" address="/"
- basePackages="org.apache.syncope.common.rest.api.service, 
org.apache.syncope.core.rest.cxf.service"
                  staticSubresourceResolution="true">
+    <jaxrs:serviceBeans>
+      <ref bean="userServiceImpl"/>
+    </jaxrs:serviceBeans>

e.g. configuring the sole UserService: I confirm it works, as in your case.

Any hint of what I am doing wrong? Thanks.

Regards.

On 29/04/2015 18:48, Sergey Beryozkin wrote:
> I've built the master branch, will be looking the first thing tomorrow 
> morning, should have time before a release...
>
> Thanks, Sergey
> On 29/04/15 15:08, Francesco Chicchiriccò wrote:
>> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>>> Hi Francesco
>>>
>>> I've done a local test by copying UserService, AbstractServiceImpl,
>>> UserServiceImpl and keeping read() and list() methods, and also
>>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping there
>>> are adapting PagedResult accordingly), and I'm seeing a schema being
>>> generated. I think the code I did few days ago is fine, it should only
>>> make the generation better, so I wonder where the problem is.
>>>
>>> Can you give me a favor and remind how can I run Syncope in a debug
>>> mode from Maven so that I can hit a breakpoint in WADLGenerator ? this
>>
>> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
>> slightly different than before - you need to
>>
>> 1. mvn -PskipTests from root directory
>> 2. cd fit/core-reference
>> 3. mvn -Pdebug
>>
>> At this point you can point your browser to
>> http://localhost:9080/syncope/rest/?_wadl
>>
>>> Or may be you can try and isolate where the problem is, example, does
>>> it get generated for your env if only UserServiceImpl rest service is
>>> registered ?
>>
>> I'll try and let you know.
>>
>>> By the way I thought you had WADL prepared during a build time ?
>>
>> In Syncope 1.2.X, WADL is made available at runtime and also generated
>> at release time, for website publishing at
>>
>> http://syncope.apache.org/rest/1.2/index.html
>>
>> In Syncope 2.0.0 we still need to port this latter feature.
>>
>> Regards.
>>
>>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>>> Hi Francesco
>>>>
>>>> I wonder if it is related somehow to
>>>>
>>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8 
>>>>
>>>>
>>>>
>>>>
>>>> I did few days back. Though I'm not immediately seeing how.
>>>>
>>>> I'll have a look shortly, will try to reproduce with a simlplified
>>>> version of
>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java 
>>>>
>>>>
>>>>
>>>>
>>>> with its list() method only...
>>>>
>>>> Cheers, Sergey
>>>>
>>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>>> Hi,
>>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration [1] I
>>>>> get an empty
>>>>>
>>>>> <grammars/>
>>>>>
>>>>> element when accessing ?_wadl
>>>>>
>>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>>> change?
>>>>>
>>>>> Thanks,
>>>>> Regards.
>>>>>
>>>>> [1] 
>>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
I've built the master branch, will be looking the first thing tomorrow 
morning, should have time before a release...

Thanks, Sergey
On 29/04/15 15:08, Francesco Chicchiriccò wrote:
> On 29/04/2015 15:57, Sergey Beryozkin wrote:
>> Hi Francesco
>>
>> I've done a local test by copying UserService, AbstractServiceImpl,
>> UserServiceImpl and keeping read() and list() methods, and also
>> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping there
>> are adapting PagedResult accordingly), and I'm seeing a schema being
>> generated. I think the code I did few days ago is fine, it should only
>> make the generation better, so I wonder where the problem is.
>>
>> Can you give me a favor and remind how can I run Syncope in a debug
>> mode from Maven so that I can hit a breakpoint in WADLGenerator ? this
>
> For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented,
> slightly different than before - you need to
>
> 1. mvn -PskipTests from root directory
> 2. cd fit/core-reference
> 3. mvn -Pdebug
>
> At this point you can point your browser to
> http://localhost:9080/syncope/rest/?_wadl
>
>> Or may be you can try and isolate where the problem is, example, does
>> it get generated for your env if only UserServiceImpl rest service is
>> registered ?
>
> I'll try and let you know.
>
>> By the way I thought you had WADL prepared during a build time ?
>
> In Syncope 1.2.X, WADL is made available at runtime and also generated
> at release time, for website publishing at
>
> http://syncope.apache.org/rest/1.2/index.html
>
> In Syncope 2.0.0 we still need to port this latter feature.
>
> Regards.
>
>> On 29/04/15 13:30, Sergey Beryozkin wrote:
>>> Hi Francesco
>>>
>>> I wonder if it is related somehow to
>>>
>>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>>>
>>>
>>>
>>> I did few days back. Though I'm not immediately seeing how.
>>>
>>> I'll have a look shortly, will try to reproduce with a simlplified
>>> version of
>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>>>
>>>
>>>
>>> with its list() method only...
>>>
>>> Cheers, Sergey
>>>
>>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>>> Hi,
>>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration [1] I
>>>> get an empty
>>>>
>>>> <grammars/>
>>>>
>>>> element when accessing ?_wadl
>>>>
>>>> With 3.0.4 everything works, instead: any relevant configuration
>>>> change?
>>>>
>>>> Thanks,
>>>> Regards.
>>>>
>>>> [1]
>>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>>>
>>>>


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 29/04/2015 15:57, Sergey Beryozkin wrote:
> Hi Francesco
>
> I've done a local test by copying UserService, AbstractServiceImpl, 
> UserServiceImpl and keeping read() and list() methods, and also 
> copying PagedResult, UserTO, and AbstractSubjectTO (and stopping there 
> are adapting PagedResult accordingly), and I'm seeing a schema being 
> generated. I think the code I did few days ago is fine, it should only 
> make the generation better, so I wonder where the problem is.
>
> Can you give me a favor and remind how can I run Syncope in a debug 
> mode from Maven so that I can hit a breakpoint in WADLGenerator ? this

For Syncope 2.0.0-SNAPSHOT (master branch) - not yet documented, 
slightly different than before - you need to

1. mvn -PskipTests from root directory
2. cd fit/core-reference
3. mvn -Pdebug

At this point you can point your browser to 
http://localhost:9080/syncope/rest/?_wadl

> Or may be you can try and isolate where the problem is, example, does 
> it get generated for your env if only UserServiceImpl rest service is 
> registered ?

I'll try and let you know.

> By the way I thought you had WADL prepared during a build time ?

In Syncope 1.2.X, WADL is made available at runtime and also generated 
at release time, for website publishing at

http://syncope.apache.org/rest/1.2/index.html

In Syncope 2.0.0 we still need to port this latter feature.

Regards.

> On 29/04/15 13:30, Sergey Beryozkin wrote:
>> Hi Francesco
>>
>> I wonder if it is related somehow to
>>
>> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8 
>>
>>
>>
>> I did few days back. Though I'm not immediately seeing how.
>>
>> I'll have a look shortly, will try to reproduce with a simlplified
>> version of
>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java 
>>
>>
>>
>> with its list() method only...
>>
>> Cheers, Sergey
>>
>> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>>> Hi,
>>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration [1] I
>>> get an empty
>>>
>>> <grammars/>
>>>
>>> element when accessing ?_wadl
>>>
>>> With 3.0.4 everything works, instead: any relevant configuration 
>>> change?
>>>
>>> Thanks,
>>> Regards.
>>>
>>> [1] 
>>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89 
>>>
>>>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/



Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Francesco

I've done a local test by copying UserService, AbstractServiceImpl, 
UserServiceImpl and keeping read() and list() methods, and also copying 
PagedResult, UserTO, and AbstractSubjectTO (and stopping there are 
adapting PagedResult accordingly), and I'm seeing a schema being 
generated. I think the code I did few days ago is fine, it should only 
make the generation better, so I wonder where the problem is.

Can you give me a favor and remind how can I run Syncope in a debug mode 
from Maven so that I can hit a breakpoint in WADLGenerator ?

Or may be you can try and isolate where the problem is, example, does it 
get generated for your env if only UserServiceImpl rest service is 
registered ?

By the way I thought you had WADL prepared during a build time ?

Thanks, Sergey



On 29/04/15 13:30, Sergey Beryozkin wrote:
> Hi Francesco
>
> I wonder if it is related somehow to
>
> https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8
>
>
> I did few days back. Though I'm not immediately seeing how.
>
> I'll have a look shortly, will try to reproduce with a simlplified
> version of
> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java
>
>
> with its list() method only...
>
> Cheers, Sergey
>
> On 29/04/15 12:51, Francesco Chicchiriccò wrote:
>> Hi,
>> when using the latest CXF 3.0.5-SNAPSHOT and this configuration [1] I
>> get an empty
>>
>> <grammars/>
>>
>> element when accessing ?_wadl
>>
>> With 3.0.4 everything works, instead: any relevant configuration change?
>>
>> Thanks,
>> Regards.
>>
>> [1]
>> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>>
>>
>>
>


Re: No grammar in WADL with CXF 3.0.5-SNAPSHOT

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Francesco

I wonder if it is related somehow to

https://fisheye6.atlassian.com/changelog/cxf?cs=300ace67c507c551b37ba4d99e6863b67bf871f8

I did few days back. Though I'm not immediately seeing how.

I'll have a look shortly, will try to reproduce with a simlplified 
version of
https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/UserServiceImpl.java

with its list() method only...

Cheers, Sergey

On 29/04/15 12:51, Francesco Chicchiriccò wrote:
> Hi,
> when using the latest CXF 3.0.5-SNAPSHOT and this configuration [1] I
> get an empty
>
> <grammars/>
>
> element when accessing ?_wadl
>
> With 3.0.4 everything works, instead: any relevant configuration change?
>
> Thanks,
> Regards.
>
> [1]
> https://github.com/apache/syncope/blob/master/core/rest-cxf/src/main/resources/restCXFContext.xml#L81-L89
>
>