cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kugaprakash Visagamani" <kvisagam...@infoblox.com>
Subject RE: Generating special annotations to WSDL2Java generated java objects!
Date Wed, 30 Jul 2008 00:51:34 GMT
Hi,
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?
Thanks
Kuga

-----Original Message-----
From: Pawel Lipka [mailto:p.lipka@amg.net.pl] 
Sent: Tuesday, July 29, 2008 3:22 PM
To: users@cxf.apache.org
Subject: RE: Generating special annotations to WSDL2Java generated java objects!

Kuga,

My advice is to go the other way round:

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

Cheers,


--

Pawel Lipka

IT Architect

________________________________

 AMG.net  businesstechnology consulting 

 http://www.amg.net.pl

Łą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 [mailto:kvisagamani@infoblox.com] 
Sent: Tuesday, July 29, 2008 8:28 PM
To: users@cxf.apache.org
Subject: Generating special annotations to WSDL2Java generated java objects!

Hi,

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">      

      <complexContent>

            <sequence>

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

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

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

            </sequence>

      </complexContent>

 </complexType>

 

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{

            @SomeAnnotation(isFilterable="true") 

      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
API:

      Public List<String> getFilterableAttributes()

      Public List<String> getSortableAttributes()

Is it possible to be able generate additional helper methods?

 

Any help is highly appreciated.

Thanks

Kuga

 

 



Mime
View raw message