AXIS: WSDL2Java generated javabean is different
I have a javabean in the following format:
public MyBean{
private String name ;
public MyBean(){
}
public MyBean(String name){
this.name = name ;
}
public String getName(){
return name ;
}
public void setName(String name){
this.name = name ;
}
}
This bean is used by my axis service. It can be created by the server and sent as a return type to my service call and used fine by the client.
I then decided to write a service that took this bean type as an input parameter. Ran Java2WSDL to generate the WSDL, then ran WSDL2Java to get the required client side code. I wrote the client and the compile failed when I attempted to use the argument based constructor. Looking at the generated code I noticed that the generated class for the bean didn't have such a constructor and only had the default constructor.
I know that the bean must have a default constructor to satisfy the requirements for a javabean, but I don't know why the other constructor is missing from the generated code.
Is this a bug or because an argument based constructor isn't allowed in a javabean?
Thanks in advance
Chris

