axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adhamh Findlay <afind...@austin.rr.com>
Subject Re: Adding fields to autogenerated java classes (wsdl2java)
Date Thu, 25 Sep 2003 03:14:59 GMT
Kevin,

I've just been working on this!  I've finally had some success too.  Here
are the signatures of a couple of methods I added.

    #I use main to run the SimpleAxisServer so I don't need Tomcat
    #this is unsupported...
    public static void main(String[] args) {}
    #This method calls a command line app and passes arguments to it.
    private String openDialogListener(String command, String args) {}

I also had a custom class hierarchy that I edited.  WSDL2Java create
serialized versions, then I added my custom code.

I have a bug (or two) in the code, but does not appear to result from the
custom methods... Err the bug is in the added methods, but it's inside my
code.

Adhamh

On 9/24/03 5:26 PM, "Liang, Kevin" <kevliang@amazon.com> wrote:

> Hi,
> 
> I have a question that I was wondering if anyone can help me with.
> 
> I am new to axis, and I have some wsdl files that I currently use to generate
> template java classes using wsdl2java tool that was provided.
> 
> I started to write code into the classes, only to find out that I will need a
> field in one of the classes to maintain relationships.  However, only I will
> be using this, while the client should not be able to access this value.  I
> would like to simply add a field into the class that was generated by wsdl,
> but I am afraid that it will modify the schema (the client has a strict wsdl
> schema structure and I would not want to change that structure).  I can, of
> course, create a table and maintain the relationship that way, but I rather
> not hack it.  
> 
> I was searching around and I read that axis uses some kind of bean serializer,
> and thus it looks for getter and setter methods to determine the schema.  I am
> wondering if this is true?  If so, then I can just add this field as a public
> field and not have a getter and setter method.  I would much rather prefer
> this way than creating another table to maintain the relationship.
> 
> Can anyone confirm this?  Or can anyone point me to where I can read about
> adding a new field into a class without violating or changing the original
> schema?
> 
> Thanks!
> 
> Kevin 
> 
> 


Mime
View raw message