Hi,
Can anyone help me with the following issue?
I have defined TestObject object in WSDL schema definition. This object has
defined annotations (documentation and appInfo) in its schema. I am trying
to get the JAVA code generated for these defined annotations. I am also
posting my sample TestObject and CustomAppInfo elements schema definition.
We are using CXF’s WsdlToJava for the code generation tool.
Any suggestions would be greatly appreciated.
<complexType name="TestObject">
<extension base="xy:Foo">
<sequence>
<element name="field1" minOccurs="0" type="xy:FooField">
<annotation>
<documentation xml:lang="en">
Some documentation for field1
</documentation>
<appinfo>
<xy:CustomAppInfo>
<readonly>true</readonly>
</xy:CustomAppInfo>
</appinfo>
</annotation>
</element>
</sequence>
</extension>
<complexType name="CustomAppInfo">
<sequence>
<element name="readonly" minOccurs="0" type="boolean">
</element>
</sequence>
</complexType>
The generated Java code:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = " TestObject ", propOrder = {" field1"})
public class TestObject extends Foo
{
protected String field1;
//get/sets for field1
}
And
XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = " CustomAppInfo ", propOrder = {"readonly"})
public class CustomAppInfo {
protected Boolean readonly;
//get/sets for readOnly field
}
However, I am trying to extract the CustomAppInfo as annotation to the
generated Java object for example, the expected result is :
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = " TestObject ", propOrder = {" field1"})
public class TestObject extends Foo
{
@CustomAppInfo (readonly=true)
protected String field1;
//get/sets for field1
}
Thanks,
Suresh
--
View this message in context: http://www.nabble.com/JAXB%3A-Java-code-generation-for-Annotation-tag-elements-%28appInfo%2C-documentation%29-tp23434345p23434345.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.