users@jaxb.java.net

Re: JAXB: Java code generation for Annotation tag elements (appInfo, documentation)

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 13 May 2009 07:45:20 +0200

Hi,

> Thanks for your suggestion. I have written custom plugin and when I ran the
> code generation, I am getting the following error.
>
> [java] WSDLToJava Error: Thrown by JAXB : compiler was unable to honor
> this CustomAppInfo:annotate customization. It is attached to a wrong place,
> or
> its inconsistent with other bindings.
>
> Here is my ws definition:
> Custom Plugin definition in WS schema .xsd:
> <schema targetNamespace="urn:sample.practice.com"
> xmlns:ib="urn:sample.practice.com"
> xmlns="http://www.w3.org/2001/XMLSchema"
> xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
> jaxb:version="2.1"
> xmlns:CustomAppInfo="http://sample.practice.com/plugin/CustomAppInfo"
> jaxb:extensionBindingPrefixes="CustomAppInfo">
>
> annotation definition using plugin
> <annotation>
> <appinfo>
> <CustomAppInfo:annotate>
> <readonly>true</readonly>
> </CustomAppInfo:annotate>
> </appinfo>
> </annotation>
>
> Am I missing something or not declaring correctly in my schema?

Check the annotate plugin. You normally need to do few things in your
plugin like declare extension namespace URIs and also mark your custom
annotations as acknowledged.

Bye.
/lexi