> > Is there such a thing in Axis as a descriptor file where one > > could list the classes/beans and also the methods that would > > like to be exposed? > > > > Or maybe the methods to be exposed can be annotated via > > custom javadoc tags. > > Can XDoclet be used to achieve this? I can't tell from > > briefly looking at it ... If someone has more experience with > > it please share it with us. > > > > Thank you. > > > > Tim > > There's a constructor for the BeanSerializer that takes 4 parameters, > the last parameter is an array of BeanPropertyDescriptor you can use > this constructor to make a beanSerialzier that only knows about a subset > of the fields on the bean. Its pretty easy to write a new Serializer > class that wraps the BeanSerializer and constructs it as needed, then > delegates all subsequent calls to it. Once you've got that, you just > need to update the type mappings to tell Axis to use your new serializer > instead of the bean serializer.
Simon, 1) Is there an example on how to do this? I'm very new to the Axis stuff ... 2) Will the WSDL need to be also fixed by hand (I use Java2WSDL to generate it) or can it somehow make use of the custom serializers to figure out the proper complex types (not very useful to have a wrong WSDL). Fixing the WSDL by hand is not really an option as I have a complicated one and I generate it a few times a day as I am still working on the implementation ... 3) Why in the world is Axis trying to be smart and expose these non-JavaBean methods? At least they should make it optional, easy to opt-in or opt-out of it, etiher way I don't care though I guess it would be correct to opt-in for this model if needed ... 4) Or maybe I should just patch the Axis code so that the BeanSerializer only looks for pairs of get/set methods and ignores non-pairs. Would this be easy to do including the proper generation of the WSDL? If so, where should I start looking at the Axis code? Thanks. Tim