atom feed3 messages in net.java.dev.jaxb.usersRe: xjc:javaType
FromSent OnAttachments
Kenny MacLeodJun 13, 2006 12:54 am 
Kenny MacLeodAug 8, 2006 12:39 am 
Kohsuke KawaguchiAug 8, 2006 9:21 am 
Subject:Re: xjc:javaType
From:Kenny MacLeod (ken@kizoom.com)
Date:Aug 8, 2006 12:39:42 am
List:net.java.dev.jaxb.users

Hi,

I've been trying to use RI 2.0.2 to use xjc:javaType in the globalBindings section as described in this issue, but I still can't get it to work.

When I try to add it, XJC complains that it's an invalid binding file:

[ERROR] cvc-complex-type.2.4.a: Invalid content was found starting with element 'xjc:javaType'. One of '{"http://java.sun.com/xml/ns/jaxb":javaType, "http://java.sun.com/xml/ns/jaxb":serializable, "http://java.sun.com/xml/ns/jaxb/xjc":serializable, "http://java.sun.com/xml/ns/jaxb/xjc":superClass, "http://java.sun.com/xml/ns/jaxb/xjc":superInterface, "http://java.sun.com/xml/ns/jaxb/xjc":typeSubstitution, "http://java.sun.com/xml/ns/jaxb/xjc":smartWildcardDefaultBinding, "http://java.sun.com/xml/ns/jaxb/xjc":simple, "http://java.sun.com/xml/ns/jaxb/xjc":generateElementProperty, "http://java.sun.com/xml/ns/jaxb/xjc":noMarshaller, "http://java.sun.com/xml/ns/jaxb/xjc":noUnmarshaller, "http://java.sun.com/xml/ns/jaxb/xjc":noValidator, "http://java.sun.com/xml/ns/jaxb/xjc":noValidatingUnmarshaller}' is expected.

cheers kenny

Kohsuke Kawaguchi wrote:

Kenny MacLeod wrote:

Hi,

I've been trying to use the xjc:javaType vendor customisation as per:

https://jaxb.dev.java.net/nonav/jaxb20-fcs/docs/vendorCustomizations.html#javaType

"The <xjc:javaType> customization can be used just like the standard <jaxb:javaType> customization"

I currently use jaxb:javaType with the xmlType attribute, within the jaxb:globalBindings section. This allows me to remap certain Schema datatypes across the whole schema.

However, when I try to use xmlType with xjc:javaType, XJC throws up an error:

"Attribute 'xmlType' is not allowed to appear in element 'xjc:javaType'"

So xjc:javaType isn't quite a drop-in replacement.

I've filed an issue for this:

https://jaxb.dev.java.net/issues/show_bug.cgi?id=182

Thanks for filing a bug. See http://forums.java.net/jive/thread.jspa?threadID=16181 for my reply.