Hi,

I decided I was curious enough to see if it would work without having
to change the endorsed directory.

I deleted the jars out of the endorsed directory and started up my
application again and executed a web service which uses both jaxws
2.2.1 and jaxb 2.2 + facets stuff and it started up perfectly fine
WITHOUT an endorsed directory.  What it looks like for me is that when
you compile the code you will probably need these jars in the endorsed
directory.  But as long as at runtime you have them in the classpath
it works fine.

Does that sound correct to others?  Thats certainly my experience.

Thanks
Jason

On Thu, Mar 3, 2011 at 12:11 PM, Jason Pell <[email protected]> wrote:
> Hi,
>
> I did not try too hard to avoid putting it into the endorsed directory.
>
> However it occurs to me that if you are using JDK 6, you already have
> that problem using JAXB 2.2 anyway as JDK 6 uses JAXB 2.1.  If there
> is a way to use JAXB 2.2 in CXF without putting jars into the endorsed
> directory then the same can apply to the jaxb-facets enhanced
> jaxb-api.
>
> One way would be to define the endorsed dirs system property instead
> and point it to a directory within your application.  I have not even
> looked at this as we can modify the JRE and it was easier to do that.
>
> Cheers
> Jason
>
> On Thu, Mar 3, 2011 at 11:13 AM, Jason Chaffee <[email protected]> wrote:
>> This is exactly what we wanting, except it doesn't seem to support key 
>> restrictions...but it does support other constraints.  However, I cannot add 
>> any jars to the endorsed directory do to some operational constraints so it 
>> won't help me much, but it is still nice to know.
>>
>> Jason
>>
>>
>> -----Original Message-----
>> From: [email protected] on behalf of Jason Pell
>> Sent: Wed 3/2/2011 2:53 PM
>> To: [email protected]
>> Cc: Hannes Holtzhausen; Jason Chaffee; Daniel Kulp
>> Subject: Re: JAXB: Any way to incorporate restrictions into annotations?
>>
>> Hi,
>>
>> I am using jaxb-facets with CXF and it works very nicely.
>>
>> http://www.infosys.tuwien.ac.at/staff/hummer/tools/jaxb-facets.html
>> http://java.net/projects/jaxb/lists/dev/archive/2011-02/message/0
>>
>> I did have to hack jaxb-api and jaxb-impl and put the hacked jaxb-api
>> into jre/lib/endorsed and override the
>> impl in CXF, but it works so well I was surprised.  I have since added
>> Date and Datetime validation and at some
>> point will need to add Decimal as well.
>>
>> If you want to get hold of my updated jaxb-api and jaxb-impl let me
>> know.  I can provide my enhancements to the original code from
>> [email protected]
>>
>> Its a real hack but it does exactly what I need and I have done it in
>> such a way that if at some point its built into jaxb I can back out my
>> changes
>> and make use of the core release again.
>>
>> Cheers
>> Jason
>>
>> On Wed, Mar 2, 2011 at 4:09 PM, Hannes Holtzhausen
>> <[email protected]> wrote:
>>> Have a look at XMLBeans If you are looking for an XML binding
>>> technology that supports the
>>> full XSD spec but still provides a Java bean style API for accessing
>>> and generating the XML.
>>>
>>> This is also not a 100% code first approach, you need to start with an
>>> XSD to generate XMLBeans.
>>> But you can do a code first web service once you have generated the 
>>> XMLBeans.
>>>
>>> http://cxf.apache.org/docs/xmlbeans.html
>>> http://xmlbeans.apache.org/
>>>
>>> Cheers
>>> Hannes
>>>
>>
>>
>

Reply via email to