cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Smyth <andrea.sm...@iona.com>
Subject Re: Get schema types from JAXB?
Date Wed, 27 Sep 2006 10:52:02 GMT
Dan Diephouse wrote:

> Daniel Kulp wrote:
>
>> Dan,
>>
>>
>>  
>>
>>> Anyone know if there is a way to get the schema type names from JAXB 
>>> for
>>> a particular class? In XFire we always used Aegis for non JAXB types 
>>> and
>>> we wrote some code to read the xml type names from the annotations too.
>>> I don't see anything that covers all the bases in the JAXB apis - so 
>>> I'm
>>> wondering what Celtix did.     
>>
>>
>> I don't think we have anything cause I don't think Celtix ever NEEDED 
>> that functionality/information.   What's the use case?
>>
>>  
>>
>>> Basically I'm looking for something that returns "xsd:string" when I 
>>> give it a String.class.
>>>     
>>
>>
>> Well, the problem is, String.class can also map to 
>> xsd:normalizedString or some of the SimpleType restrictions.   Thus, 
>> that's not reliable.
>>
>>
>>   
>
> Use case is we're taking a class and generating a WSDL for it. To do 
> this you have to figure out what the schema types are of the operation 
> parameters.
>
> - Dan
>
AFAIK a javax.xml.bind.annotation (XmlType) is needed to map e.g. a 
String to something other than xsd:string.
Don't know if jxc includes an API that - given a primitive or a standard 
Java class - returns the mapped xml schema type, or if indeed any of jxc 
could be useful here.
Similar stuff for the schema to java case was coded manually (that's 
JABUtils in rt-common-utilities).

Andrea.

Mime
View raw message