cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kugaprakash Visagamani" <>
Subject RE: Generating special annotations to WSDL2Java generated java objects!
Date Wed, 30 Jul 2008 00:51:34 GMT
First, thank you for helping with a suggestion.
I thought of doing so, but since there are too many objects, thought of checking the possibility
of having custom annotations if possible to generate using WSDL.

Can anyone please let me know if it is possible to generate custom annotations?

-----Original Message-----
From: Pawel Lipka [] 
Sent: Tuesday, July 29, 2008 3:22 PM
Subject: RE: Generating special annotations to WSDL2Java generated java objects!


My advice is to go the other way round:

1) Forget about custom attribudes in the XSD
2) Write your foo/bar/ file manually
3) Annotate them with SomeAnnotation as you wish
4) Annotate them with JAXB annotations
5) Create and files manually for the package
6) Configure wsdl2java to ignore the XML namespace to which your Content xml
type is bound



Pawel Lipka

IT Architect

________________________________  businesstechnology consulting

Łąkowa 11, 90-554 Lodz, tel/fax (42) 296 11 32

Tresc niniejszej wiadomosci moze byc poufna. Jezeli nie jestescie Panstwo
jej adresatem, to rozprowadzanie  lub wykorzystywanie zawartych tu
informacji jest zabronione.

-----Original Message-----
From: Kugaprakash Visagamani [] 
Sent: Tuesday, July 29, 2008 8:28 PM
Subject: Generating special annotations to WSDL2Java generated java objects!


Can some please help me with the following questions?

For instance I have a table of contents with each row is of type "Content",
and the ability of the column to sort/filter comes is defined in the XSD as
part of the XSD definition given below:


 <complexType: name="Content">      



                  <element name="slNo" type="int" isSortable="true"/>

                  <element name="content" type="string"
isFilterable="true" isSortable="true"/>

                  <element name="pageNo" type="int"/>





Note that there are two additional special attributes (custom
attributes) for element ("isFilterable" and "isSortable") in the XSD.

Q1: These additional attributes can they be defined, if so can you please
let me know how?

Q2: Intention for these additional attribute is that, would like to have
them as annotations in wsdlToJava generated objects, sample expected result
is given below:


      Public class Content{


      Private int slNo;

      @SomeAnnotation(isFilterable="true", isSortable="true")

      Private String content

      Private int pageNo;




Is this possible to be able to generate our own annotations
(@SomeAnnotation)?  Is so, please help me with a sample.


Q3: During the process of wsdltojava, can I try to create additional helper
methods? Like for the example above, I may need the following

      Public List<String> getFilterableAttributes()

      Public List<String> getSortableAttributes()

Is it possible to be able generate additional helper methods?


Any help is highly appreciated.





View raw message