cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Voß, Marko <Marko.V...@fiz-Karlsruhe.de>
Subject RE: How to setup XML catalog for JAX-RS services?
Date Mon, 24 Sep 2012 11:26:13 GMT
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:sberyozkin@gmail.com] 
Sent: Friday, September 21, 2012 11:27 AM
To: Voß, Marko
Cc: users@cxf.apache.org
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:sberyozkin@gmail.com]
>> Sent: Wednesday, June 27, 2012 4:39 PM
>> To: Voß, Marko
>> Cc: users@cxf.apache.org
>> 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:sberyozkin@gmail.com]
>>> Sent: Tuesday, June 26, 2012 10:54 AM
>>> To: Voß, Marko
>>> Cc: users@cxf.apache.org
>>> 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.cxf$
>>> cxf-bundle/
>>>
>>> and try it
>>>
>>> Cheers, Sergey
>>>
>>>> Marko
>>>>
>>>> -----Original Message-----
>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>> Sent: Monday, June 25, 2012 1:24 PM
>>>> To: Voß, Marko
>>>> Cc: users@cxf.apache.org
>>>> 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/jav
>>>> a
>>>> /org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java?p2=%2Fcxf%2F
>>>> t
>>>> runk%2Frt%2Ffrontend%2Fjaxrs%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcxf
>>>> %
>>>> 2Fjaxrs%2Fprovider%2FAbstractJAXBProvider.java&p1=%2Fcxf%2Ftrunk%2Frt
>>>> %
>>>> 2Ffrontend%2Fjaxrs%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcxf%2Fjaxrs%2
>>>> F
>>>> provider%2FAbstractJAXBProvider.java&r1=1352965&r2=1352964&view=diff&
>>>> p
>>>> athrev=1352965
>>>>
>>>> Sergey
>>>>
>>>>
>>>>> I used the location: "classpath:/xsd/catalog.xml"
>>>>>
>>>>> Best regards,
>>>>> Marko
>>>>>
>>>>> -----Original Message-----
>>>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>>>> Sent: Monday, June 25, 2012 12:47 PM
>>>>> To: Voß, Marko
>>>>> Cc: users@cxf.apache.org
>>>>> 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:sberyozkin@gmail.com]
>>>>>> Sent: Friday, June 22, 2012 7:04 PM
>>>>>> To: Voß, Marko
>>>>>> Cc: users@cxf.apache.org
>>>>>> 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:Marko.Voss@fiz-Karlsruhe.de]
>>>>>>>>>> Sent: Wednesday, June 20, 2012 1:51 PM
>>>>>>>>>> To: Sergey Beryozkin; users@cxf.apache.org
>>>>>>>>>> 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:sberyozkin@gmail.com]
>>>>>>>>>> Sent: Wednesday, June 20, 2012 11:42 AM
>>>>>>>>>> To: users@cxf.apache.org
>>>>>>>>>> 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.



Mime
View raw message