On 01/10/12 15:29, Voß, Marko wrote:
Hi Sergey,

Well, personally I do not care much about deploy-time. Of course, it should not 
take many minutes but in the end it is ok, if it requires more time for the 
startup to run smoothly afterwards. Just my 2 cents here.

Personally, I would like to see this feature because we grouped the schemas in 
different directories for a better overview. If you can use classpath:/**/*.xsd 
one does not need to update the spring configuration everytime someone updates 
the schemas. (add/delete) This makes development easier. My 2 cents here too. :)

I do agree it makes sense, I was just not happy at all with the solution I came up with - it was just not good :-) and I did not have more time

I'll get back to this issue, but also please do not hesitate to contribute when 
you get a chance

What kind of contribution? :)


To get the class path scanning working cleanly & effectively. I'd get back to it when I start implementing an optional auto-discovery of JAX-RS providers (though with the @Provider annotations) - if you have some ideas or hints - please share them

Sergey


best


-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Tuesday, September 25, 2012 5:33 PM
To: Voß, Marko
Cc: [email protected]
Subject: Re: How to setup XML catalog for JAX-RS services?

I think it make sense to review this issue once we have an (optional) mechanism 
in place for the fast class-scanning of JAX-RS providers.

I'll get back to this issue, but also please do not hesitate to contribute when 
you get a chance

Cheers, Sergey

On 25/09/12 16:03, Sergey Beryozkin wrote:
Hi Marko
On 25/09/12 11:44, Voß, Marko wrote:
Hello Sergey,

I have removed some schemas, which will be used as imports only, from
the list and it worked.

The current setup is this one:

<bean name="MyJAXBProvider" class="...">  <property
name="schemaLocations">  <list>
<value>classpath:/value/foo.xsd</value>
...
</list>
</property>
</bean>

I am no longer using the schemaLocations-elements in jaxrs:server
bean. Does this matter to you?


Not really,

So, one only needs to setup the root schemas.


OK, thanks for the confirmation.

I've tried do some basic code to support expressions like
"classpath:/value/*.xsd". Unfortunately the tests show that for plain
file-based resources it works reasonably well, but for wars it can be
very expensive (using JDK Jar URL connection and JARArchive) to
selectively choose a list of matching entries. JARArchive simply
returns a list of all the entries available, while individual JAREntry
can not list its own sub entries...

To be honest I'm not keen at this point of time to push any relevant
code, I agree it can be handy to avoid listing say 10 top-level
schemas, but getting a code which will cause a delay in startup will
not be ideal at this stage. I'm hoping the fact that only root-level
schemas have to be set now, as well as the support for 'demaarcating'
schemas between different types will make it easier to work with the
large number of schema resources

Cheers, Sergey


-----Original Message-----
From: Voß, Marko [mailto:[email protected]]
Sent: Monday, September 24, 2012 1:26 PM
To: Sergey Beryozkin
Cc: [email protected]
Subject: RE: How to setup XML catalog for JAX-RS services?

Hello Sergey,

We have 75 schemas with many imports. I think I only put the root
schemas into the list of schema files but I have to check this first.


Best,



-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Friday, September 21, 2012 11:27 AM
To: Voß, Marko
Cc: [email protected]
Subject: Re: How to setup XML catalog for JAX-RS services?

Hi Marko
On 05/09/12 22:53, Sergey Beryozkin wrote:
Hi
On 05/09/12 17:10, Voß, Marko wrote:
Hello Sergey,

I've updated to CXF 2.6.2 and did the following things:

<jaxrs:server>
<jaxrs:schemaLocations>
<jaxrs:schemaLocation>classpath*:/xsd/*.xsd</jaxrs:schemaLocation>
</ jaxrs:schemaLocations>
...
</jaxrs:server>

1. I can see that the code in ResourceUtils is checking for the
prefix "classpath:" so the commonly known ANT style pattern cannot
be used. :(

2. "*.xsd" does not work, so we have to list ALL the schema files
there and we have a lot


Can you please clarify this issue for me.
Are these schemas all related (example, there's a single root schema
and the rest - the schemas it depends upon via imports or includes) ?
If yes, then having a single root schema linked to should do.


Let me know please,

Cheers, Sergey

Could ANT style pattern be supported please?

=======

I tried this one too:

<bean name="MyJaxbProvider" class="foo.bar.MyJaxbProvider">  ...
<property name="catalogLocation" value="classpath:/xsd/*.xsd"/>
</bean>

I tried both approaches at the same time and noticed that the first
test did work only. (the one with "classpath*:")


I think we can support regular expressions, like '/xsd/*.xsd'

How can I figure out, if the XML catalog is working? Is there any
logging or something, which shows me, that the catalog is in use?

I guess you can try and disconnect from network ?

Cheers, Sergey


Thank you and best regards,
Marko

-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Wednesday, June 27, 2012 4:39 PM
To: Voß, Marko
Cc: [email protected]
Subject: Re: How to setup XML catalog for JAX-RS services?

Hi
On 27/06/12 15:37, Voß, Marko wrote:
Hello Sergey,

I am sorry but I do no longer have time to test this. I will wait
for the 2.6.2 release.

sure

Do you have an idea, when this version is being released?

I guess in 4-6 weeks or so

Cheers, Sergey


Best regards,
Marko

-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Tuesday, June 26, 2012 10:54 AM
To: Voß, Marko
Cc: [email protected]
Subject: Re: How to setup XML catalog for JAX-RS services?

Hi
On 25/06/12 13:18, Voß, Marko wrote:
Hello Sergey,

I am sorry, but still no such method. Maybe Jenkins did not
deploy the last build?

The resolved snapshot version is: 2.6.2-20120623.062344-10.

I still do not see the updated snapshots in the Maven repo but the
actual Deploy build in Jenkins seems to have succeeded, so may be
you can try and download a cxf-bundle from
https://builds.apache.org/job/CXF-2.6-deploy/lastBuild/org.apache.
cx
f$
cxf-bundle/

and try it

Cheers, Sergey

Marko

-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Monday, June 25, 2012 1:24 PM
To: Voß, Marko
Cc: [email protected]
Subject: Re: How to setup XML catalog for JAX-RS services?

Hi
On 25/06/12 12:19, Voß, Marko wrote:
Hello Sergey,

There is no such method. I also tried to run our
integration-tests to test, if the IDE did not update the sources
but it fails with the message:

Error creating bean... etc etc... invalid property 'catalogLocation'

Can you rerun the maven build with -U option ?
I can see the build finishing OK
https://builds.apache.org/job/CXF-2.6.x/lastBuild/
See this update:
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main
/j
av
a
/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java?p2=%2Fcx
f%
2F
t
runk%2Frt%2Ffrontend%2Fjaxrs%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2
Fc
xf
%
2Fjaxrs%2Fprovider%2FAbstractJAXBProvider.java&p1=%2Fcxf%2Ftrunk%
2F
rt
%
2Ffrontend%2Fjaxrs%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcxf%2Fjax
rs
%2
F
provider%2FAbstractJAXBProvider.java&r1=1352965&r2=1352964&view=d
if
f&
p
athrev=1352965

Sergey


I used the location: "classpath:/xsd/catalog.xml"

Best regards,
Marko

-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Monday, June 25, 2012 12:47 PM
To: Voß, Marko
Cc: [email protected]
Subject: Re: How to setup XML catalog for JAX-RS services?

Hi
On 25/06/12 11:36, Voß, Marko wrote:
Hello Sergey,

I've just updated to 2.6.2-SNAPSHOT and there does not seem to
be a method 'setCatalogLocation' in JAXBElementProvider.
Did you already updated your snapshot?

It is available on AbstractJAXBProvider; the value should
include a URI scheme, example "classpath:" or "file:"

Cheers, Sergey


Best regards,
Marko


-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Friday, June 22, 2012 7:04 PM
To: Voß, Marko
Cc: [email protected]
Subject: Re: How to setup XML catalog for JAX-RS services?

Hi Marko

I've coded the initial support for it, CXF already has a lot of
the useful code so it was relatively easy to add this support.
Can you please experiment when you get a chance with the new
snapshots, say on Monday ?
Please see
https://issues.apache.org/jira/browse/CXF-4393

I did not merge to 2.4.x only.

Default is META-INF/jax-rs-catalog.xml, but that can be
overridden to refer to the existing META-INF/jax-ws-catalog.xml
if any or to some other catalog, JAXBElementProvider has a
'catalogLocation'
property.

Give it a try please

Thanks, Sergey

On 21/06/12 14:15, Sergey Beryozkin wrote:
Hi Marko
On 21/06/12 13:44, Voß, Marko wrote:
Hello Sergey,

we did a little complex solution for it and because of that,
I liked to ask here.

We basically extended the JAXBElementProvider, added a
property for a
org.apache.cxf.jaxrs.utils.schemas.SchemaHandler
implementation, modified the get/setSchema methods to use
this SchemaHandler, which itself has a property for a
org.w3c.dom.ls.LSResourceResolver, which uses a
org.apache.xerces.util.XMLCatalogResolver.

Do you really want this piece of code?

Let me look at the WADLToJava code generator, Dan did some
related fix there...Still not ready to do it, but we'll get it
sorted out

Thanks, Sergey

Best regards,
Marko

Am 21.06.2012 13:27, schrieb Sergey Beryozkin:
Hi
On 21/06/12 11:53, Voß, Marko wrote:
Hello,

so we have to implement our own way to get XML catalog
working, right? We already did that but I thought there is
an easier way.

There will be an easier way :-), I just have not had any
time yet to look into it yet. What you did, is that similar
to the way CXF manages its jaxws-catalog.xml ? If yes -
please provide a patch, otherwise I'll look into it asap

Cheers, Sergey

Best regards,
Marko

-----Original Message-----
From: Voß, Marko [mailto:[email protected]]
Sent: Wednesday, June 20, 2012 1:51 PM
To: Sergey Beryozkin; [email protected]
Subject: RE: How to setup XML catalog for JAX-RS services?

Hello Sergey,

We need JAXB to validate incoming and outgoing XML. Since
our schemas may have many imports, they should be loaded
from the local files system ideally. This increases the performance.


Best regards,
Marko


-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Wednesday, June 20, 2012 11:42 AM
To: [email protected]
Cc: Voß, Marko
Subject: Re: How to setup XML catalog for JAX-RS services?

Hi Marko
On 19/06/12 18:24, Voß, Marko wrote:
Hello,

I cannot find any documentation about this.

Searching the web I found that one has to put a
jax-ws-catalog.xml to the /META-INF directory.

There is also a catalog.xml according to the checkin
history
here:

https://issues.apache.org/jira/browse/CXF-1112?page=com.atlassian.


jira .plugin.system.issuetabpanels:all-tabpanel


We are using JAX-RS. So how to setup a XML catalog?

At the moment setting a catalog only works with a
wadl-to-java tool, can you explain please why it is
required in your case ?

Cheers, Sergey

Best regards,
Marko


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht
Mannheim HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.






--
Sergey Beryozkin

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

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht
Mannheim HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.




--
Sergey Beryozkin

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

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht
Mannheim HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.




--
Sergey Beryozkin

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

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht
Mannheim HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.




--
Sergey Beryozkin

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

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht
Mannheim HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.




--
Sergey Beryozkin

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

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht
Mannheim HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.







-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim
HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.




-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für
wissenschaftlich-technische Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim
HRB 101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.






--
Sergey Beryozkin

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

Blog: http://sberyozkin.blogspot.com


-------------------------------------------------------

Fachinformationszentrum Karlsruhe, Gesellschaft für wissenschaftlich-technische 
Information mbH.
Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB 
101892.
Geschäftsführerin: Sabine Brünger-Weilandt.
Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner.


Reply via email to