Can you help me out with a situation that we are stuck with in WebServices.
I have a WebService which returns a DTO which has a getter and setter for an array of another type of DTO object.
Sample:-
public class MyDTO extends AnotherDTO implements Serializable { private InnerDTO qcDtoList[] = new InnerDTO[0];
public MyDTO() { }
public InnerDTO[] getQcDtoList() { return qcDtoList; }
public void setQcDtoList(InnerDTO[] resEDXDTOs) { qcDtoList = resEDXDTOs; } }
But when I generate the WSDL for the webservice using WSAD 5.1 that uses the above DTO, the server side generated skeleton file looks like:-
public class MyDTO extends AnotherDTO implements java.io.Serializable { private InnerDTO[] qcDtoList; public MyDTO() { } public InnerDTO[] getQcDtoList() { return qcDtoList; } public void setQcDtoList(InnerDTO[] qcDtoList) { this.qcDtoList = qcDtoList; } }
As you can see from above, my initialization info is not available in the generated skeleton. I also tried putting the initialization in the constructor, with no effect.
What could be the reason for this? And is it possible to initialize my InnerDTO without losing it in the generated skeleton? I simply want to initialize the object array. If I need to modify my WSDL, what additional annotations should I add on the WSDL to get the desired effect?
I would really appreciate if you can throw light on this?